chore: adjust gameci workflow to run on external PRs

This commit is contained in:
bd_ 2023-03-25 14:03:48 +09:00
parent c405ff1089
commit a56d8a0ab8

View File

@ -27,9 +27,17 @@ name: GameCI
on: on:
push: push:
branches: [master, dev, ci] branches: [master, dev, ci]
pull_request: {} # This is a bit of a radioactive event; we need to be very careful with what permissions
# we assign this action, as we're allowing arbitrary code execution with the context of
# whatever permissions we assign.
pull_request_target: {}
workflow_dispatch: {} workflow_dispatch: {}
# pull_request_target grants access to a privileged GITHUB_TOKEN by default, revoke this
permissions:
contents: read
checks: write
jobs: jobs:
build-and-test: build-and-test:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -37,22 +45,14 @@ jobs:
checks: write checks: write
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
# with:
# ref: project-for-test
# - uses: actions/checkout@v3
# with:
# path: Packages/nadena.dev.modular-avatar
- uses: anatawa12/sh-actions/resolve-vpm-packages@master
- uses: actions/cache@v3
with: with:
path: Library ref: ${{ github.event.pull_request.head.sha }}
key: Library - uses: anatawa12/sh-actions/resolve-vpm-packages@master
restore-keys: Library
- uses: game-ci/unity-test-runner@v2 - uses: game-ci/unity-test-runner@v2
id: gameci id: gameci
env: env:
# meh, just a personal license...
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
with: with:
testMode: EditMode testMode: EditMode