[skip ci] Fix GitHub actions (#3625)

This commit is contained in:
Fesaa 2025-03-13 15:21:10 +00:00 committed by GitHub
parent 78f5e240e2
commit 8f454a0282
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 10 additions and 14 deletions

View file

@ -14,14 +14,11 @@ jobs:
generate-openapi:
runs-on: ubuntu-latest
# Only run on direct pushes to develop, not PRs
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
if: (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && github.repository_owner == 'Kareadita'
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.REPO_GHA_PAT }}
- name: Setup .NET
uses: actions/setup-dotnet@v4
@ -60,12 +57,12 @@ jobs:
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git commit -m "Update OpenAPI documentation" openapi.json
# Pull latest changes with rebase to avoid merge commits
git pull --rebase origin develop
# Commit and push
git commit -m "Update OpenAPI documentation" openapi.json
git push
env:
GITHUB_TOKEN: ${{ secrets.REPO_GHA_PAT }}
GITHUB_TOKEN: ${{ secrets.REPO_GHA_PAT }}