From f50f8d0f936fbf6c887f04af465cb7b31c5bb1ac Mon Sep 17 00:00:00 2001 From: Adphi Date: Thu, 23 Feb 2023 11:59:15 +0100 Subject: [PATCH] actions: build release snapshot only on main and tags Signed-off-by: Adphi --- .github/workflows/ci.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index ce2e8b8..51131bd 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -119,6 +119,7 @@ jobs: - name: Import GPG key id: import_gpg uses: crazy-max/ghaction-import-gpg@v4 + if: startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main' with: gpg_private_key: ${{ secrets.GPG_KEY }} passphrase: ${{ secrets.GPG_PASSWORD }} @@ -127,6 +128,7 @@ jobs: run: make build-snapshot - name: Release Snapshot + if: startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main' env: GITHUB_TOKEN: ${{ secrets.REPOSITORIES_ACCESS_TOKEN }} GPG_PASSWORD: ${{ secrets.GPG_PASSWORD }}