diff --git a/.github/workflows/build_deploy.yml b/.github/workflows/build_deploy.yml index b9a25f868d..49c9a884ec 100644 --- a/.github/workflows/build_deploy.yml +++ b/.github/workflows/build_deploy.yml @@ -155,6 +155,12 @@ jobs: strategy: matrix: network: ["TEST", "BETA", "LIVE"] + env: + CI_TAG: ${{ needs.prepare_build.outputs.ci_tag }} + DOCKER_REGISTRY: ${{ vars.DOCKER_REGISTRY }} + DOCKER_USER: ${{ vars.DOCKER_USER }} + DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} + IS_RELEASE_BUILD: ${{ github.event.inputs.is_release_build || 'false' }} steps: - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 #v3.1.0 with: @@ -165,23 +171,15 @@ jobs: run: ci/actions/linux/docker-build.sh env: NETWORK: ${{ matrix.network }} - CI_TAG: ${{ needs.prepare_build.outputs.ci_tag }} - DOCKER_REGISTRY: ${{ vars.DOCKER_REGISTRY }} - - name: Check if secrets.DOCKER_PASSWORD exists - run: echo "DOCKER_PASSWORD_EXISTS=${{ secrets.DOCKER_PASSWORD != '' }}" >> $GITHUB_ENV - name: Deploy Docker Hub - if: env.DOCKER_PASSWORD_EXISTS == 'true' + if: env.DOCKER_PASSWORD != '' run: ci/actions/linux/docker-deploy.sh env: - CI_TAG: ${{ needs.prepare_build.outputs.ci_tag }} NETWORK: ${{ matrix.network }} - DOCKER_REGISTRY: ${{ vars.DOCKER_REGISTRY }} - DOCKER_USER: ${{ vars.DOCKER_USER }} DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} - name: Deploy Docker (ghcr.io) run: ci/actions/linux/ghcr-deploy.sh env: - CI_TAG: ${{ needs.prepare_build.outputs.ci_tag }} NETWORK: ${{ matrix.network }} DOCKER_REGISTRY: ghcr.io DOCKER_USER: ${{ github.repository_owner }} diff --git a/ci/actions/linux/docker-impl/docker-common.sh b/ci/actions/linux/docker-impl/docker-common.sh index bcda39fbbd..912558b12c 100755 --- a/ci/actions/linux/docker-impl/docker-common.sh +++ b/ci/actions/linux/docker-impl/docker-common.sh @@ -18,7 +18,11 @@ fi if [[ "$NETWORK" = "LIVE" ]]; then echo "Live" - network_tag_suffix='' + if [[ "$IS_RELEASE_BUILD" = "true" ]]; then + network_tag_suffix='' + else + network_tag_suffix='-nightly' + fi network="live" elif [[ "$NETWORK" = "BETA" ]]; then echo "Beta"