name: Minor Patch Diff Workflow on: schedule: - cron: '0 7 * * *' # 11PM PST is 7AM UTC workflow_dispatch: jobs: check-and-diff: runs-on: ubuntu-latest permissions: contents: write pull-requests: write steps: - name: Checkout uses: actions/checkout@v6 - name: Set up Python uses: actions/setup-python@v6 with: python-version: '3.12' cache: 'pip' - name: Fetch Patch Info and Update Versions id: versions if: steps.downloader-latest.outputs.updated == 'true' || github.event_name == 'workflow_dispatch' run: python automation/ffxiv_info.py >> $GITHUB_OUTPUT - name: Download Latest ffxiv_dx11.exe id: downloader-latest uses: WorkingRobot/ffxiv-downloader@v8 with: output-path: latest regex: '^ffxiv_dx11\.exe$' - name: Download Previous ffxiv_dx11.exe if: steps.versions.outputs.is_new == 'true' uses: WorkingRobot/ffxiv-downloader@v8 with: version: ${{ steps.versions.outputs.thaliak_version_prev }} output-path: previous regex: '^ffxiv_dx11\.exe$' - name: Install Analysis Tools if: steps.versions.outputs.is_new == 'true' run: | curl -L -o radare2.deb https://github.com/radareorg/radare2/releases/download/6.1.0/radare2_6.1.0_amd64.deb sudo dpkg -i radare2.deb || sudo apt-get install -f -y rm radare2.deb - name: Install Python Dependencies if: steps.versions.outputs.is_new == 'true' run: | pip install -r requirements-vtable.txt - name: Run Diff if: steps.versions.outputs.is_new == 'true' run: | LATEST_EXE=$(find latest -name "ffxiv_dx11.exe" | head -n 1) PREVIOUS_EXE=$(find previous -name "ffxiv_dx11.exe" | head -n 1) cp "$LATEST_EXE" "ffxiv_dx11.${{ steps.versions.outputs.retail_new }}.exe" cp "$PREVIOUS_EXE" "ffxiv_dx11.${{ steps.versions.outputs.retail_prev }}.exe" # 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: Upload Results if: steps.versions.outputs.is_new == 'true' uses: actions/upload-artifact@v6 with: name: diff path: | 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@v8 with: token: ${{ secrets.GITHUB_TOKEN }} commit-message: "Update for ${{ steps.versions.outputs.retail_new }} (${{ steps.versions.outputs.thaliak_version_new }})" title: "Update for ${{ steps.versions.outputs.retail_new }} (${{ steps.versions.outputs.thaliak_version_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" branch-suffix: "short-commit-hash" base: "main" delete-branch: true