Skip to content

Commit

Permalink
Updated pipeline to work better with pull requests.
Browse files Browse the repository at this point in the history
  • Loading branch information
kristofferahl committed Nov 26, 2020
1 parent 0e36d95 commit 7301f7b
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,27 +38,37 @@ jobs:
name: Import GPG key
id: import_gpg
uses: paultyng/ghaction-import-gpg@v2.1.0
if: env.GPG_PRIVATE_KEY != '' && env.PASSPHRASE != ''
env:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
-
name: Build
name: Build and sign
run: ./run build --sign
if: steps.import_gpg.outputs.fingerprint != ''
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GORELEASER_BIN: ${{ github.workspace }}/bin/goreleaser
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
-
name: Build
run: ./run build
if: steps.import_gpg.outputs.fingerprint == ''
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GORELEASER_BIN: ${{ github.workspace }}/bin/goreleaser
-
name: Test
run: ./run test
-
name: Intergration Test
run: ./run docker test-integration
if: env.HEALTHCHECKSIO_API_KEY != ''
env:
HEALTHCHECKSIO_API_KEY: ${{ secrets.HEALTHCHECKSIO_API_KEY }}
-
name: Release on valid tag
if: startsWith(github.ref, 'refs/tags/v')
if: github.repository == 'kristofferahl/terraform-provider-healtchecksio' && startsWith(github.ref, 'refs/tags/v')
run: ./run release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down

0 comments on commit 7301f7b

Please sign in to comment.