From ee4368d1f00f5fc8e58668979c92fc66855f165a Mon Sep 17 00:00:00 2001 From: Keith Zantow Date: Thu, 7 Apr 2022 13:41:58 -0400 Subject: [PATCH] Only run Syft auto-update in main repo (#234) --- .github/workflows/update-syft-release.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/update-syft-release.yml b/.github/workflows/update-syft-release.yml index 9c5ffae5..ea125dc2 100644 --- a/.github/workflows/update-syft-release.yml +++ b/.github/workflows/update-syft-release.yml @@ -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"