diff --git a/.github/workflows/upstream.yml b/.github/workflows/upstream.yml index 01c8f7f..e2acdef 100644 --- a/.github/workflows/upstream.yml +++ b/.github/workflows/upstream.yml @@ -6,16 +6,19 @@ name: Upstream # library; a newer library release becomes a .wut-version pull request (the # test suite reviews it). # -# Requires the UPSTREAM_TOKEN secret: a fine-grained token for this -# repository with Contents, Pull requests and Issues read/write. Pull requests -# opened with it trigger the test suite, unlike GITHUB_TOKEN. +# Uses GITHUB_TOKEN; the repository allows Actions to create pull requests. +# Pull requests opened with it trigger no workflows, so the job dispatches the +# test suite on the branch itself. on: schedule: - cron: '0 6 * * 1' workflow_dispatch: permissions: - contents: read + contents: write + pull-requests: write + issues: write + actions: write concurrency: group: upstream @@ -27,17 +30,9 @@ jobs: runs-on: ubuntu-24.04 timeout-minutes: 20 env: - GH_TOKEN: ${{ secrets.UPSTREAM_TOKEN }} + GH_TOKEN: ${{ github.token }} steps: - - name: Require the upstream token - run: | - if [ -z "$GH_TOKEN" ]; then - echo "::error::Add the UPSTREAM_TOKEN repository secret (see the workflow header)." - exit 1 - fi - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 - with: - token: ${{ secrets.UPSTREAM_TOKEN }} - name: Install tools run: sudo apt-get update && sudo apt-get install -y luajit python3 curl - name: Fetch pinned libraries @@ -96,3 +91,4 @@ jobs: Review the [library changes](https://github.com/$repository/compare/$pinned...$latest) and the spell catalogue check. Install and check the client before merging when the build changes behaviour." fi + gh workflow run tests.yml --ref "$branch"