update some ptcreature pad #18
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: Update minimal branch with history | |
| on: | |
| push: | |
| branches: | |
| - master # trigger when master changes | |
| paths: | |
| - 'BnsPlugin/DataConstants.h' | |
| - 'BnsPlugin/Data.h' | |
| - 'BnsPlugin/DatafilePluginsdk.h' | |
| - 'BnsPlugin/DrEl.h' | |
| - 'BnsPlugin/imgui_plugin_api.h' | |
| workflow_dispatch: | |
| jobs: | |
| update-minimal: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write # <-- allows pushing to the repo | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v3 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| fetch-depth: 0 # full history needed for branch updates | |
| - name: Set up Git identity | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| - name: Ensure minimal branch exists | |
| run: | | |
| git fetch origin minimal-sdk-headers || echo "Branch does not exist yet" | |
| git checkout minimal-sdk-headers || git checkout -b minimal-sdk-headers | |
| - name: Copy latest headers from master | |
| run: git checkout origin/master -- BnsPlugin/DataConstants.h BnsPlugin/Data.h BnsPlugin/DatafilePluginsdk.h BnsPlugin/DrEl.h BnsPlugin/imgui_plugin_api.h | |
| - name: Add header files | |
| run: git add BnsPlugin/DataConstants.h BnsPlugin/Data.h BnsPlugin/DatafilePluginsdk.h BnsPlugin/DrEl.h BnsPlugin/imgui_plugin_api.h | |
| - name: Commit changes | |
| run: | | |
| if ! git diff-index --quiet HEAD; then | |
| git commit -m "Update header files from master" | |
| git push origin minimal-sdk-headers | |
| else | |
| echo "No changes to commit" | |
| fi | |