Update Webmentions #8634
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: Update Webmentions | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
repository_dispatch: | |
types: [add-webmention] | |
schedule: | |
# https://crontab.guru/every-1-hour | |
- cron: '0 * * * *' | |
concurrency: | |
group: ${{ github.workflow }} | |
cancel-in-progress: true | |
jobs: | |
webmentions: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
pull-requests: write | |
steps: | |
- name: Checkout the project | |
uses: actions/checkout@v3 | |
- name: Select Node.js version | |
uses: actions/setup-node@v3 | |
with: | |
node-version-file: '.node-version' | |
- name: Install dependencies | |
run: npm ci | |
- name: Run webmention script | |
env: | |
WEBMENTION_IO_TOKEN: ${{ secrets.WEBMENTION_IO_TOKEN }} | |
run: npm run webmention >> $GITHUB_STEP_SUMMARY | |
- name: Format webmentions | |
run: npm run format:webmention | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v4 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
branch: webmentions | |
delete-branch: true | |
commit-message: Update Webmentions | |
title: Update Webmentions | |
labels: automerge 🤞 |