Skip to content

Do not hardcode repository name #2

Do not hardcode repository name

Do not hardcode repository name #2

Workflow file for this run

name: Alphabetise extension list
on:
push:
branches: [ main ]
paths:
- antora-playbook.yml
workflow_dispatch:
defaults:
run:
shell: bash
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:

Check failure on line 22 in .github/workflows/alphabetise.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/alphabetise.yml

Invalid workflow file

You have an error in your yaml syntax on line 22
- uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install packages
run: npm install -g yaml-sort
- name: Alphabetise
id: alpha
uses: mikefarah/yq@master
with:
path: antora-playbook.yml
cmd: '.content.sources |= sort_by(.url)'
- name: Overwite file
run: |
echo ${{ steps.alpha.outputs.result }} > antora-playbook.yml
- name: Create Pull Request
run: |
git checkout -b alpha-${{ github.run_id }}
git add antora-playbook.yml
git commit -m "Automatic alphabetisation"
git push
gh pr create --title "Automatic alphabetisation" --fill --repo $GITHUB_REPOSITORY
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}