From abdc9eb47b6c4e4f4764bc4b6cb6c1fe07472e4e Mon Sep 17 00:00:00 2001 From: Keith Zantow Date: Mon, 3 Apr 2023 10:17:42 -0400 Subject: [PATCH] chore: update grype update (#224) Signed-off-by: Keith Zantow --- .github/workflows/update-grype-release.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/update-grype-release.yml b/.github/workflows/update-grype-release.yml index 0cbf1626..969176d5 100644 --- a/.github/workflows/update-grype-release.yml +++ b/.github/workflows/update-grype-release.yml @@ -13,15 +13,18 @@ jobs: if: github.repository == 'anchore/scan-action' steps: - uses: actions/checkout@v3 - - run: | - LATEST_VERSION=$(curl "https://api.github.com/repos/anchore/grype/releases/latest" 2>/dev/null | jq -r '.tag_name') + - name: Get latest Grype version + id: latest-version + env: + GITHUB_TOKEN: ${{ github.token }} + run: | + LATEST_VERSION=$(gh release view --json name -q '.name' -R anchore/grype) echo "exports.GRYPE_VERSION = \"$LATEST_VERSION\";" > GrypeVersion.js # install husky hooks and dependencies: npm install npm run build # 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: