Skip to content

Commit

Permalink
Add permissions, modernize
Browse files Browse the repository at this point in the history
  • Loading branch information
Arjan Dikhoff committed Nov 20, 2024
1 parent 6d9d746 commit 5fc1d26
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions .github/workflows/sync_class_ref.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,18 @@ jobs:
runs-on: ubuntu-latest
env:
engine_rev: '4.3'

permissions:
contents: write
pull-requests: write

steps:
- name: Checkout the documentation repository
uses: actions/checkout@v4

- name: Checkout the engine repository
uses: actions/checkout@v4
with:
repository: 'redot-engine/redot-engine'
repository: 'Redot-Engine/redot-engine'
# Use the appropriate branch for the documentation version.
ref: ${{ env.engine_rev }}
path: './.engine-src'
Expand All @@ -33,7 +36,7 @@ jobs:
cd ./.engine-src
hash=$(git rev-parse HEAD)
hash_short=$(git rev-parse --short HEAD)
echo "Checked out redot-engine/redot at $hash"
echo "Checked out redot-engine/redot-engine at $hash"
echo "rev_hash=$hash" >> $GITHUB_OUTPUT
echo "rev_hash_short=$hash_short" >> $GITHUB_OUTPUT
Expand All @@ -46,18 +49,18 @@ jobs:
./.engine-src/doc/tools/make_rst.py --color -o ./classes -l en ./.engine-src/doc/classes ./.engine-src/modules ./.engine-src/platform
- name: Submit a pull-request
uses: peter-evans/create-pull-request@v6
uses: peter-evans/create-pull-request@v7
with:
commit-message: 'classref: Sync with current ${{ env.engine_rev }} branch (${{ steps.engine.outputs.rev_hash_short }})'
branch: 'classref/sync-${{ steps.engine.outputs.rev_hash_short }}'
add-paths: './classes'
delete-branch: true

# Configure the commit author.
author: 'Redot Organization <noreply@redot-url.org>'
committer: 'Redot Organization <noreply@redot-url.org>'
author: 'Redot Organization <noreply@redotengine.org>'
committer: 'Redot Organization <noreply@redotengine.org>'

# Configure the pull-request.
title: 'classref: Sync with current ${{ env.engine_rev }} branch (${{ steps.engine.outputs.rev_hash_short }})'
body: 'Update Redot API online class reference to match the engine at https://github.com/redot-engine/redot/commit/${{ steps.engine.outputs.rev_hash }} (`${{ env.engine_rev }}`).'
body: 'Update Redot API online class reference to match the engine at https://github.com/Redot-Engine/redot-engine/commit/${{ steps.engine.outputs.rev_hash }} (`${{ env.engine_rev }}`).'
labels: 'area:class reference,bug,enhancement'

0 comments on commit 5fc1d26

Please sign in to comment.