actions: build release snapshot only on main and tags

Signed-off-by: Adphi <philippe.adrien.nousse@gmail.com>
This commit is contained in:
Adphi 2023-02-23 11:59:15 +01:00 committed by Adphi
parent 1970ac19e4
commit f50f8d0f93
1 changed files with 2 additions and 0 deletions

View File

@ -119,6 +119,7 @@ jobs:
- name: Import GPG key - name: Import GPG key
id: import_gpg id: import_gpg
uses: crazy-max/ghaction-import-gpg@v4 uses: crazy-max/ghaction-import-gpg@v4
if: startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main'
with: with:
gpg_private_key: ${{ secrets.GPG_KEY }} gpg_private_key: ${{ secrets.GPG_KEY }}
passphrase: ${{ secrets.GPG_PASSWORD }} passphrase: ${{ secrets.GPG_PASSWORD }}
@ -127,6 +128,7 @@ jobs:
run: make build-snapshot run: make build-snapshot
- name: Release Snapshot - name: Release Snapshot
if: startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main'
env: env:
GITHUB_TOKEN: ${{ secrets.REPOSITORIES_ACCESS_TOKEN }} GITHUB_TOKEN: ${{ secrets.REPOSITORIES_ACCESS_TOKEN }}
GPG_PASSWORD: ${{ secrets.GPG_PASSWORD }} GPG_PASSWORD: ${{ secrets.GPG_PASSWORD }}