Skip to content

Parent repository for [techcloud0-actions/actions-gh-pages] has updates available #80

Parent repository for [techcloud0-actions/actions-gh-pages] has updates available

Parent repository for [techcloud0-actions/actions-gh-pages] has updates available #80

name: Send notification on new issue
on:
issues:
types: [opened]
jobs:
# tag the team from the variables on any new issues created in this repo
tag-a-user:
if: ${{ vars.SEND_NOTIFICATION == 'true' }}
runs-on: ubuntu-latest
steps:
- uses: peter-murray/workflow-application-token-action@d17e3a9a36850ea89f35db16c1067dd2b68ee343 # v2.1.0
if: ${{ vars.use_github_app == 'true' }}
id: get-workflow-token
with:
application_id: ${{ secrets.GH_AUTOMATION_ID }}
application_private_key: ${{ secrets.GH_AUTOMATION_PRIVATE_KEY }}
- id: get-token
env:
github_app_token: ${{ steps.get-workflow-token.outputs.token }}
PAT_GITHUB: ${{ secrets.PAT_GITHUB }}
run: |
if [ -n $github_app_token ]; then
echo "token=$github_app_token" >> $GITHUB_OUTPUT
echo "Using token from GitHub App"
else
echo "token=$PAT_GITHUB" >> $GITHUB_OUTPUT
echo "Using personal access token from secret 'PAT_GITHUB'"
fi
- uses: devops-actions/[email protected]
name: Tag a user or team in an issue comment
with:
issue: ${{ github.event.issue.number }}
team: ${{ vars.NOTIFICATION_TEAM }}
owner: ${{ github.repository_owner }}
repo: ${{ github.repository }}
GITHUB_TOKEN: ${{ steps.get-token.outputs.token }}