Skip to content

Commit

Permalink
Run CI on PRs to release branch, remove set-output
Browse files Browse the repository at this point in the history
  • Loading branch information
lucacome committed Oct 25, 2022
1 parent f67d70c commit ca2a41f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:
pull_request:
branches:
- main
- release-*
types:
- opened
- reopened
Expand All @@ -32,7 +33,6 @@ jobs:
name: Checks and variables
runs-on: ubuntu-20.04
outputs:
sha: ${{ steps.vars.outputs.sha }}
go_path: ${{ steps.vars.outputs.go_path }}
steps:
- name: Checkout Repository
Expand All @@ -45,8 +45,7 @@ jobs:
- name: Output Variables
id: vars
run: |
echo "::set-output name=sha::$(echo ${GITHUB_SHA} | cut -c1-7)"
echo "::set-output name=go_path::$(go env GOPATH)"
echo "go_path=$(go env GOPATH)" >> $GITHUB_OUTPUT
- name: Check if go.mod and go.sum are up to date
run: |
go mod tidy && git diff --exit-code -- go.mod go.sum
Expand All @@ -68,7 +67,7 @@ jobs:
- name: Upload Coverage Report
uses: actions/upload-artifact@v3
with:
name: cover-${{ needs.vars.outputs.sha }}.html
name: cover-${{ github.run_id }}.html
path: ${{ github.workspace }}/cover.html
if: always()

Expand Down Expand Up @@ -129,6 +128,7 @@ jobs:

- name: Download Syft
uses: anchore/sbom-action/[email protected]
if: startsWith(github.ref, 'refs/tags/')

- name: Build binary
uses: goreleaser/goreleaser-action@v3
Expand Down

0 comments on commit ca2a41f

Please sign in to comment.