Skip to content

Commit

Permalink
fix ever failing release asset validator workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Sophie Wigmore authored and sophiewigmore committed Sep 22, 2022
1 parent 7f125e5 commit b5fa550
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion .github/workflows/validate-release-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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}}

0 comments on commit b5fa550

Please sign in to comment.