From e8d1cd652dd636ad14b420da984f0bd4bf84ee0a Mon Sep 17 00:00:00 2001 From: Friedrich Date: Wed, 7 Feb 2024 09:23:53 +0100 Subject: [PATCH] replace action to install yq with some shell commands (#68) * replace action to install yq with some shell commands * setup go * use github path * remove whitespace --- .../bump-sec-scanners-config-reusable.yml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/bump-sec-scanners-config-reusable.yml b/.github/workflows/bump-sec-scanners-config-reusable.yml index cdc2582..9ee99a6 100644 --- a/.github/workflows/bump-sec-scanners-config-reusable.yml +++ b/.github/workflows/bump-sec-scanners-config-reusable.yml @@ -67,15 +67,24 @@ jobs: - name: Checkout code uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version: "stable" + - name: "Setup yq" # Required for rendering the sec-scanners-config. - uses: dcarbone/install-yq-action@v1.1.1 + shell: bash + run: | + go install github.com/mikefarah/yq/v4@latest + echo "$(go env GOPATH)/bin" >> $GITHUB_PATH - name: Render sec-scanners-config.yaml env: VERSION: ${{ inputs.VERSION }} shell: bash # Where ever you use this workflow, the script hack/scripts/render-sec-scanners-config.sh must exist. - run: ./hack/scripts/render-sec-scanners-config.sh "${VERSION}" + run: | + yq --version + ./hack/scripts/render-sec-scanners-config.sh "${VERSION}" # Check if there are changes so we can determin if all following steps can be skipped. - name: Check for changes @@ -84,7 +93,7 @@ jobs: if [ -z "$(git status --porcelain)" ]; then echo "No changes found. No need to create a PR" else - echo "Changes found. Creating a PR and waiting for it to be merged." + echo "Changes found. Creating a PR and waiting for it to be merged." echo "CREATE_PR=true" >> $GITHUB_ENV fi