diff --git a/.github/workflows/publish-snapshot.yml b/.github/workflows/publish-snapshot.yml new file mode 100644 index 0000000000..565a1e008d --- /dev/null +++ b/.github/workflows/publish-snapshot.yml @@ -0,0 +1,34 @@ +name: Publish snapshot + +on: + workflow_dispatch: + inputs: + branch: + description: 'For which branch build snapshot?' + required: true + +jobs: + publish: + + runs-on: ubuntu-latest + environment: ci + + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + ref: ${{ github.event.inputs.branch }} + - name: Publish docker snapshot + env: + RETRY_COUNT: 3 + run: | + docker login --username ${{ secrets.DOCKER_HUB_USERNAME }} --password ${{ secrets.DOCKER_HUB_PASSWORD }} + export RALPH_VERSION=$(shell ./get_version.sh show) + until [ "$RETRY_COUNT" -le 0 ] + do + make publish-docker-snapshot-image && break + RETRY_COUNT=$((RETRY_COUNT-1)) + echo "==== Publish docker failed. Remaining retries: $RETRY_COUNT ====" + done + docker logout diff --git a/Makefile b/Makefile index 2f0752c4c5..617686554c 100644 --- a/Makefile +++ b/Makefile @@ -69,6 +69,11 @@ publish-docker-image: build-docker-image docker push $(DOCKER_REPO_NAME)/ralph-static-nginx:$(RALPH_VERSION) docker push $(DOCKER_REPO_NAME)/ralph-static-nginx:latest +publish-docker-snapshot-image: version = $(shell ./get_version.sh show) +publish-docker-snapshot-image: build-snapshot-docker-image + docker push $(DOCKER_REPO_NAME)/ralph:$(version) + docker push $(DOCKER_REPO_NAME)/ralph-static-nginx:$(version) + install-js: npm install ./node_modules/.bin/gulp diff --git a/src/ralph/settings/dev.py b/src/ralph/settings/dev.py index 59f29824c3..a8444a514d 100644 --- a/src/ralph/settings/dev.py +++ b/src/ralph/settings/dev.py @@ -59,3 +59,5 @@ def only_true(request): 'function': 'DataCenterAssetAdmin.changelist_view' }, ] +ADMIN_SITE_HEADER = 'Ralph DEV' +ADMIN_SITE_TITLE = 'Ralph DEV'