UniRec: a unimodular-like framework for nested recursions and loops #46
Workflow file for this run
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: Notifications | |
on: | |
pull_request: | |
types: | |
- closed | |
jobs: | |
notifications: | |
if: ${{ github.event.pull_request.merged == true && | |
contains(github.event.pull_request.labels.*.name, 'next-paper') }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Get selection details | |
id: vars | |
run: | | |
echo "title=$(sed -n '1p' ./data/desc.txt)" >> $GITHUB_OUTPUT && | |
echo "mla=$(sed -n '2p' ./data/desc.txt)" >> $GITHUB_OUTPUT | |
- name: Discord notification | |
if: ${{ env.DISCORD_WEBHOOK != '' }} | |
env: | |
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK_URL }} | |
uses: Ilshidur/action-discord@master | |
with: | |
args: "Next paper: ${{ steps.vars.outputs.title }}\n\n${{ steps.vars.outputs.mla }}" | |
- name: Send custom JSON data to Slack workflow | |
if: ${{ env.SLACK_WEBHOOK_URL != '' }} | |
id: slack | |
uses: slackapi/[email protected] | |
with: | |
slack-message: "Next paper: ${{ steps.vars.outputs.title }}\n\n${{ steps.vars.outputs.mla }}" | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | |
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK |