fixup! fixup! fixup! test #5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
push: | |
jobs: | |
check-nightly: | |
runs-on: ubuntu-latest | |
outputs: | |
resolver: ${{ steps.nightly.outputs.resolver }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: build with nightly | |
id: nightly | |
run: | | |
# get the latest nightly resolver | |
resolver=$(curl -s -w %{redirect_url} https://www.stackage.org/nightly | sed 's:.*/::') | |
echo "resolver=$resolver" >> $GITHUB_OUTPUT | |
stack build --resolver $resolver | |
report-failure: | |
runs-on: ubuntu-latest | |
if: failure() | |
needs: check-nightly | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: haskell-actions/setup@v2 | |
with: | |
enable-stack: true | |
stack-version: 'latest' | |
- name: Report build failure | |
env: | |
RESOLVER: ${{ needs.check-nightly.outputs.resolver }} | |
run: | | |
# you can change 'libraries' to the channel dedicated to the library, if there is one | |
# in order for a bot to be able to post messages, it must be added to the appropriate channel | |
curl -XPOST https://slack.com/api/chat.postMessage \ | |
-H "Authorization: Bearer ${{ secrets.SLACK_TOKEN }}" \ | |
-d "channel=libraries" \ | |
-d "text=Repository https://github.com/${{ github.repository }} failed to build with latest nightly resolver ($RESOLVER)." |