added fluentjdbc (#209) #33
This file contains hidden or 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: 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: | |
- uses: actions/checkout@v4 | |
- name: Alphabetise | |
run: | | |
yq '.content.sources |= sort_by(.url)' antora-playbook.yml > antora-playbook-sorted.yml | |
mv antora-playbook-sorted.yml antora-playbook.yml | |
- name: Configure Git author | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Action" | |
- name: Create Pull Request | |
# Skip main in forks | |
if: "github.repository == 'quarkiverse/quarkiverse-docs' && endsWith(github.ref, '/main')" | |
run: | | |
git checkout -b sorting-${{ github.run_id }} | |
git add antora-playbook.yml | |
git update-index --really-refresh | |
if git diff-index --quiet HEAD | |
then | |
echo "Working tree is clean, so not doing anything." | |
else | |
git commit -m "Automatic alphabetisation" | |
git push --set-upstream origin sorting-${{ github.run_id }} | |
gh pr create --title "Automatic alphabetisation" --body "This commit was created by a script in the Alphabetise workflow." --repo $GITHUB_REPOSITORY | |
fi | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |