Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run CI on PRs to release branch, remove set-output #283

Merged
merged 1 commit into from
Nov 2, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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