Adjust permissions for gh workflow and upload results before PR
This commit is contained in:
@@ -8,6 +8,9 @@ on:
|
||||
jobs:
|
||||
check-and-diff:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
pull-requests: write
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
@@ -62,21 +65,6 @@ jobs:
|
||||
# Run the diffing process and capture JSON output
|
||||
python vtable_diff.py "ffxiv_dx11.${{ steps.versions.outputs.retail_prev }}.exe" "ffxiv_dx11.${{ steps.versions.outputs.retail_new }}.exe" > "diffs/${{ steps.versions.outputs.retail_new }}.diff.json"
|
||||
|
||||
- name: Create Pull Request
|
||||
if: steps.versions.outputs.is_new == 'true'
|
||||
uses: peter-evans/create-pull-request@v6
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
commit-message: "Update for retail version ${{ steps.versions.outputs.retail_new }} (${{ steps.versions.outputs.date_new }})"
|
||||
title: "Update for retail version ${{ steps.versions.outputs.retail_new }} (${{ steps.versions.outputs.date_new }})"
|
||||
body: |
|
||||
This automatic update contains the following changes:
|
||||
- Updated `ffxiv_versions_global.json`
|
||||
- Generated vtable diff for retail version ${{ steps.versions.outputs.retail_new }}
|
||||
branch: "auto-update-${{ steps.versions.outputs.date_new }}"
|
||||
base: "main"
|
||||
delete-branch: true
|
||||
|
||||
- name: Upload Results
|
||||
if: steps.versions.outputs.is_new == 'true'
|
||||
uses: actions/upload-artifact@v4
|
||||
@@ -84,3 +72,19 @@ jobs:
|
||||
name: vtable-diffs-${{ steps.versions.outputs.date_new }}
|
||||
path: |
|
||||
diffs/*.diff.json
|
||||
|
||||
- name: Create Pull Request
|
||||
if: steps.versions.outputs.is_new == 'true'
|
||||
uses: peter-evans/create-pull-request@v8
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
commit-message: "Update for ${{ steps.versions.outputs.retail_new }} (${{ steps.versions.outputs.date_new }})"
|
||||
title: "Update for ${{ steps.versions.outputs.retail_new }} (${{ steps.versions.outputs.date_new }})"
|
||||
body: |
|
||||
This automatic update contains the following changes:
|
||||
- Updated `ffxiv_versions_global.json`
|
||||
- Generated opcode diff for retail version ${{ steps.versions.outputs.retail_new }}
|
||||
branch: "auto-update/${{ steps.versions.outputs.date_new }}"
|
||||
base: "main"
|
||||
delete-branch: true
|
||||
|
||||
|
||||
Reference in New Issue
Block a user