Skip to content

Commit 7acf5dc

Browse files
committed
Run CI on PRs to release branch, remove set-output (nginx#283)
1 parent 1e1537e commit 7acf5dc

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ on:
1010
pull_request:
1111
branches:
1212
- main
13+
- release-*
1314
types:
1415
- opened
1516
- reopened
@@ -32,7 +33,6 @@ jobs:
3233
name: Checks and variables
3334
runs-on: ubuntu-20.04
3435
outputs:
35-
sha: ${{ steps.vars.outputs.sha }}
3636
go_path: ${{ steps.vars.outputs.go_path }}
3737
steps:
3838
- name: Checkout Repository
@@ -45,8 +45,7 @@ jobs:
4545
- name: Output Variables
4646
id: vars
4747
run: |
48-
echo "::set-output name=sha::$(echo ${GITHUB_SHA} | cut -c1-7)"
49-
echo "::set-output name=go_path::$(go env GOPATH)"
48+
echo "go_path=$(go env GOPATH)" >> $GITHUB_OUTPUT
5049
- name: Check if go.mod and go.sum are up to date
5150
run: |
5251
go mod tidy && git diff --exit-code -- go.mod go.sum
@@ -68,7 +67,7 @@ jobs:
6867
- name: Upload Coverage Report
6968
uses: actions/upload-artifact@v3
7069
with:
71-
name: cover-${{ needs.vars.outputs.sha }}.html
70+
name: cover-${{ github.run_id }}.html
7271
path: ${{ github.workspace }}/cover.html
7372
if: always()
7473

@@ -129,6 +128,7 @@ jobs:
129128

130129
- name: Download Syft
131130
uses: anchore/sbom-action/download-syft@v0.12.0
131+
if: startsWith(github.ref, 'refs/tags/')
132132

133133
- name: Build binary
134134
uses: goreleaser/goreleaser-action@v3

0 commit comments

Comments
 (0)