quick test #219
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
name: Prerelease Notification | |
on: | |
push: | |
branches: | |
- atavism/pr-summary | |
jobs: | |
create-release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Send Slack Notification | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.LANTERN_APP_SLACK_RELEASES_WEBHOOK }} | |
run: | | |
REPO_URL="https://github.com/getlantern/lantern-client" | |
PR_SUMMARY=$(git log --since="1 week ago" --pretty=format:"%h %s" | grep -E "#[0-9]+" | sed -E 's|#([0-9]+)|[#\1]('"${REPO_URL}"'/pull/\1)|') | |
SLACK_MESSAGE="Test: *A new release is available!* 🚀\n\n${PR_SUMMARY}" | |
echo "Slack Payload Debug: $SLACK_MESSAGE" | |
curl -X POST -H 'Content-type: application/json' --data {\"text\":\"${SLACK_MESSAGE}\"}" $SLACK_WEBHOOK_URL | |
# - name: Send Slack Notification | |
# env: | |
# SLACK_WEBHOOK_URL: ${{ secrets.LANTERN_APP_SLACK_RELEASES_WEBHOOK }} | |
# run: | | |
# SLACK_PAYLOAD=$(jq -n --arg text "*A new release is available!* 🚀\n\n${{ steps.pr-summary.outputs.summary }}" '{"text": $text}') | |
# echo "Slack Payload Debug: $SLACK_PAYLOAD" | |
# # curl -X POST -H 'Content-type: application/json' \ | |
# # --data "{\"text\":\"${SLACK_MESSAGE}\"}" $SLACK_WEBHOOK_URL |