From 320944192ca948739653468b50f172340881b45b Mon Sep 17 00:00:00 2001 From: Damon To Date: Sun, 31 Mar 2024 12:37:48 +0800 Subject: [PATCH] chore: add conditional step for building and pushing Docker image only for tagged versions --- .github/workflows/docker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index d89e558..1cb0e26 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -15,7 +15,6 @@ jobs: permissions: contents: write packages: write - if: startsWith(github.ref, 'refs/tags/v') steps: - name: Checkout code uses: actions/checkout@v4 @@ -52,6 +51,7 @@ jobs: username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push + if: startsWith(github.ref, 'refs/tags/v') uses: docker/build-push-action@v5 with: context: .