Skip to content

build SPECURLS.json #1222

build SPECURLS.json

build SPECURLS.json #1222

name: build SPECURLS.json
on:
schedule:
- cron: '49 2 * * *'
workflow_dispatch:
defaults:
run:
shell: bash
jobs:
build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 19
- name: Run SPECURLS.json build
id: incoming
run: |
echo "conclusion=success" >> $GITHUB_OUTPUT
make URLS-LOG \
|| echo "conclusion=failure" >> $GITHUB_OUTPUT
- uses: crazy-max/ghaction-import-gpg@v3
with:
gpg-private-key: ${{ secrets.GPG_SIGNING_KEY }}
passphrase: ${{ secrets.GPG_SIGNING_KEY_PASSPHRASE }}
git-user-signingkey: true
git-commit-gpgsign: true
- name: Create pull request
id: cpr
uses: peter-evans/create-pull-request@v3
with:
title: Update SPECURLS.json
commit-message: Update SPECURLS.json
committer: sideshowbarkerbot <sideshowbarker+sideshowbarkerbot@gmail.com>
author: sideshowbarkerbot <sideshowbarker+sideshowbarkerbot@gmail.com>
assignees: sideshowbarker
reviewers: sideshowbarker
branch: create-pull-request/patch-spec-urls
delete-branch: true
- name: Log pull request URL
run: |
echo "Pull request URL: ${{ steps.cpr.outputs.pull-request-url }}"
- name: Set status
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
curl \
-X POST \
-H "Authorization: Bearer $GITHUB_TOKEN" \
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/repos/w3c/mdn-spec-links/statuses/${{ github.sha }} \
-d '{"state": "success", "context": "Update SPECURLS.json" }'
make report-only || true
if [[ "${{ steps.build.outputs.conclusion }}" == "failure" ]]; then exit 1; fi