Use selected branch for automated mapping updates
This commit is contained in:
parent
c87ad76b75
commit
c61b3f8048
2 changed files with 11 additions and 9 deletions
6
.github/workflows/update-mappings.yml
vendored
6
.github/workflows/update-mappings.yml
vendored
|
|
@ -23,7 +23,7 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
env:
|
env:
|
||||||
AUTOMATION_BRANCH: dev/automated-mapping-update
|
AUTOMATION_BRANCH: dev/automated-mapping-update-${{ github.ref_name }}
|
||||||
NTE_ASSETS_REF: ${{ inputs.source_ref }}
|
NTE_ASSETS_REF: ${{ inputs.source_ref }}
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
|
@ -32,7 +32,7 @@ jobs:
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v5
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
ref: ${{ github.event.repository.default_branch }}
|
ref: ${{ github.ref_name }}
|
||||||
|
|
||||||
- name: Get Python
|
- name: Get Python
|
||||||
uses: actions/setup-python@v6
|
uses: actions/setup-python@v6
|
||||||
|
|
@ -91,7 +91,7 @@ jobs:
|
||||||
if: steps.changes.outputs.changed == 'true'
|
if: steps.changes.outputs.changed == 'true'
|
||||||
shell: bash
|
shell: bash
|
||||||
env:
|
env:
|
||||||
BASE_BRANCH: ${{ github.event.repository.default_branch }}
|
BASE_BRANCH: ${{ github.ref_name }}
|
||||||
RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
|
RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
|
||||||
run: |
|
run: |
|
||||||
python - <<'PY'
|
python - <<'PY'
|
||||||
|
|
|
||||||
|
|
@ -18,15 +18,17 @@ game whose asset tables evolve over time.
|
||||||
|
|
||||||
### GitHub Actions
|
### GitHub Actions
|
||||||
|
|
||||||
Run **Update reward mappings** from the repository's Actions tab. The optional
|
Run **Update reward mappings** from the repository's Actions tab. **Use
|
||||||
`source_ref` input accepts an NTE_Assets branch, tag, or commit and defaults to
|
workflow from** selects the exporter branch whose updater is run and the target
|
||||||
`main`.
|
branch for the resulting pull request. The `source_ref` input separately
|
||||||
|
selects an NTE_Assets branch, tag, or commit and defaults to `main`.
|
||||||
|
|
||||||
The workflow rebuilds the mappings, runs the complete test suite, uploads the
|
The workflow rebuilds the mappings, runs the complete test suite, uploads the
|
||||||
JSON review report, and opens a pull request from
|
JSON review report, and opens a pull request from
|
||||||
`dev/automated-mapping-update`. Running it again updates the same open pull
|
`dev/automated-mapping-update-<selected-branch>`. Running it again for the same
|
||||||
request. If the authoritative snapshot has not changed, it reports zero changes
|
selected branch updates that branch's open pull request. If the authoritative
|
||||||
and does not create a commit or pull request.
|
snapshot has not changed, it reports zero changes and does not create a commit
|
||||||
|
or pull request.
|
||||||
|
|
||||||
The repository setting **Allow GitHub Actions to create and approve pull
|
The repository setting **Allow GitHub Actions to create and approve pull
|
||||||
requests** must be enabled for automatic pull-request creation. The workflow
|
requests** must be enabled for automatic pull-request creation. The workflow
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue