Skip to content

Commit

Permalink
chore: update syft update check (#408)
Browse files Browse the repository at this point in the history
Signed-off-by: Keith Zantow <kzantow@gmail.com>
  • Loading branch information
kzantow authored Apr 3, 2023
1 parent a7622b6 commit 642f63c
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/update-syft-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,17 @@ jobs:
if: github.repository == 'anchore/sbom-action'
steps:
- uses: actions/checkout@v3
- run: |
LATEST_VERSION=$(curl -H "Accept: application/json" -H "Authorization: Bearer ${{ github.token }}" "https://api.github.com/repos/anchore/syft/releases/latest" 2>/dev/null | jq -r '.tag_name')
- name: Get latest Syft version
id: latest-version
env:
GITHUB_TOKEN: ${{ github.token }}
run: |
LATEST_VERSION=$(gh release view --json name -q '.name' -R anchore/syft)
echo "export const VERSION = \"$LATEST_VERSION\";" > src/SyftVersion.ts
# install husky hooks and dependencies:
npm install
# export the version for use with create-pull-request:
echo "LATEST_VERSION=$LATEST_VERSION" >> $GITHUB_OUTPUT
id: latest-version
- uses: tibdex/github-app-token@v1
id: generate-token
with:
Expand Down

0 comments on commit 642f63c

Please sign in to comment.