diff --git a/.github/workflows/dev_container.yml b/.github/workflows/dev_container.yml index 69f9609776..47b0c74210 100644 --- a/.github/workflows/dev_container.yml +++ b/.github/workflows/dev_container.yml @@ -32,13 +32,14 @@ jobs: - name: Login to Docker Hub uses: docker/login-action@v3 - if: github.event_name != 'pull_request' + if: ${{ startsWith(github.ref, 'refs/tags/') }} with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Login to GitHub Container Registry uses: docker/login-action@v3 + if: ${{ startsWith(github.ref, 'refs/tags/') }} with: registry: ghcr.io username: ${{ github.actor }} @@ -89,6 +90,7 @@ jobs: - name: Push container image uses: docker/build-push-action@v6 + if: ${{ startsWith(github.ref, 'refs/tags/') }} with: context: Tools/setup tags: ${{ steps.meta.outputs.tags }} @@ -96,6 +98,6 @@ jobs: platforms: | linux/amd64 provenance: mode=max - push: ${{ startsWith(github.ref, 'refs/tags/') }} + push: true cache-from: type=s3,blobs_prefix=cache/${{ github.repository }}/,manifests_prefix=cache/${{ github.repository }}/,region=${{ env.RUNS_ON_AWS_REGION }},bucket=${{ env.RUNS_ON_S3_BUCKET_CACHE }} cache-to: type=s3,blobs_prefix=cache/${{ github.repository }}/,manifests_prefix=cache/${{ github.repository }}/,region=${{ env.RUNS_ON_AWS_REGION }},bucket=${{ env.RUNS_ON_S3_BUCKET_CACHE }},mode=max