Public Chat Group #23
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: | |
issue_comment: | |
types: [created, edited, deleted] | |
name: Public Chat Group | |
jobs: | |
update_message: | |
name: Update Message | |
if: ${{ github.event.issue.title == 'Public Chat Group π± π± π±' }} | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
- name: Update message from comments | |
uses: actions/github-script@v7 | |
with: | |
script: | | |
const message = require('./.github/public_chat_message.js') | |
message({github, context}) | |
- name: Push message update | |
env: | |
GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
run: | | |
git config --global user.name 'GitHub Actions' | |
git config --global user.email '41898282+github-actions[bot]@users.noreply.github.com' | |
git add profile/README.md | |
git commit -m ':dart: update message' || echo "No changes to commit" | |
git push "https://${GH_TOKEN}@github.com/${{ github.repository }}.git" HEAD:main |