Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add permissions, modernize #76

Merged
merged 1 commit into from
Nov 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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'