Skip to content

Commit

Permalink
Only run Syft auto-update in main repo (#234)
Browse files Browse the repository at this point in the history
  • Loading branch information
kzantow authored Apr 7, 2022
1 parent 4378f91 commit ee4368d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/update-syft-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@ on:
jobs:
upgrade-syft:
runs-on: ubuntu-latest
if: github.repository == 'anchore/sbom-action'
steps:
- uses: actions/checkout@v3
- run: |
LATEST_VERSION=$(curl "https://api.github.com/repos/anchore/syft/releases/latest" 2>/dev/null | jq -r '.tag_name')
echo "export const VERSION = \"$LATEST_VERSION\";" > src/SyftVersion.ts
# since husky hooks are not installed, manually run this:
# install husky hooks and dependencies:
npm install
# export the version for use with create-pull-request:
echo "::set-output name=LATEST_VERSION::$LATEST_VERSION"
Expand Down

0 comments on commit ee4368d

Please sign in to comment.