From b5fa5506b4a3a8e0082e2fa88c62dfbe169971be Mon Sep 17 00:00:00 2001 From: Sophie Wigmore Date: Thu, 22 Sep 2022 11:06:05 -0400 Subject: [PATCH] fix ever failing release asset validator workflow --- .../workflows/validate-release-version.yml | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/.github/workflows/validate-release-version.yml b/.github/workflows/validate-release-version.yml index a55daf6..cb27d16 100644 --- a/.github/workflows/validate-release-version.yml +++ b/.github/workflows/validate-release-version.yml @@ -14,7 +14,7 @@ jobs: id: event run: | echo "::set-output name=tag::$(jq -r '.release.tag_name' "${GITHUB_EVENT_PATH}" | sed s/^v//)" - echo "::set-output name=download_url::$(jq -r '.release.assets[] | select(.name | endswith("linux")) | .url' "${GITHUB_EVENT_PATH}")" + echo "::set-output name=download_url::$(jq -r '.release.assets[] | select(.name | endswith("linux")) | .browser_download_url' "${GITHUB_EVENT_PATH}")" - name: Download id: download uses: paketo-buildpacks/github-config/actions/release/download-asset@main @@ -31,3 +31,21 @@ jobs: echo "Version built into binary ($binVersion) and github release ($githubReleaseVersion) are not identical" exit 1 fi + failure: + name: Alert on Failure + runs-on: ubuntu-latest + needs: [ validate ] + if: ${{ always() && needs.validate.result == 'failure' }} + steps: + - name: File Failure Alert Issue + uses: paketo-buildpacks/github-config/actions/issue/file@main + with: + token: ${{ secrets.GITHUB_TOKEN }} + repo: ${{ github.repository }} + label: "failure:release" + comment_if_exists: true + issue_title: "Failure: Asset Validation Workflow" + issue_body: | + Release asset validation workflow [failed](https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}). + comment_body: | + Another failure occurred: https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}