Update reccmp CSV files #4666
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 reccmp CSV files | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: '0 */2 * * *' | |
| env: | |
| GHIDRA_VERSION: 11.1.2 | |
| GHIDRA_DATE: 20240709 | |
| GHIDRA_SERVER: "roblab.la" | |
| GHIDRA_PROJECT_NAME: "Touhou" | |
| GHIDRA_FOLDER: "Touhou 08 - Imperishable Night" | |
| GHIDRA_FILE_NAME: "th08_v100d.exe" | |
| jobs: | |
| update-mapping: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install python 3.11 | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.11' | |
| - name: Get ghidra | |
| run: | | |
| curl -L https://github.com/NationalSecurityAgency/ghidra/releases/download/Ghidra_${GHIDRA_VERSION}_build/ghidra_${GHIDRA_VERSION}_PUBLIC_${GHIDRA_DATE}.zip -o /tmp/ghidra.zip | |
| unzip -d /tmp /tmp/ghidra.zip | |
| echo /tmp/ghidra_*/support >> $GITHUB_PATH | |
| - name: Update mapping | |
| run: | | |
| echo "$GHIDRA_SSH_AUTH" > ssh_key | |
| python scripts/export_ghidra_to_reccmp.py --username github-action --ssh-key ssh_key --program "$GHIDRA_FILE_NAME" --project-name "$GHIDRA_PROJECT_NAME" "ghidra://$GHIDRA_SERVER/$GHIDRA_PROJECT_NAME/$GHIDRA_FOLDER" | |
| rm ssh_key | |
| env: # Or as an environment variable | |
| GHIDRA_SSH_AUTH: ${{ secrets.GHIDRA_SSH_AUTH }} | |
| - name: Create PR to project with updated mapping | |
| uses: peter-evans/create-pull-request@v6 | |
| with: | |
| commit-message: Update reccmp CSVs to latest ghidra changes | |
| branch: update-mapping | |
| title: Update reccmp CSVs from ghidra | |
| body: Updates the reccmp CSVs to the latest changes in the ghidra database. | |
| token: ${{ secrets.GH_TOKEN_PAT }} |