From 4af2b395562310eb3bb70b21f462fba31fae682d Mon Sep 17 00:00:00 2001 From: Tarrence van As Date: Tue, 14 May 2024 12:52:35 -0400 Subject: [PATCH] Don't push devcontainer on non-main push --- .github/workflows/devcontainer.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/devcontainer.yml b/.github/workflows/devcontainer.yml index b4be87553e..5b3f5b492b 100644 --- a/.github/workflows/devcontainer.yml +++ b/.github/workflows/devcontainer.yml @@ -64,7 +64,7 @@ jobs: - name: Build and push Docker image uses: docker/build-push-action@v2 with: - push: true + push: (github.event_name == 'push' && github.ref == 'refs/heads/main') || (github.event_name == 'release' && startsWith(github.ref, 'refs/tags/')) file: .devcontainer/Dockerfile tags: ghcr.io/${{ github.repository }}-dev:latest,ghcr.io/${{ github.repository }}-dev:${{ env.DOCKER_TAG }} build-args: |