From b9f1a9a41f99778c1bd6fc8dd24751e1878f04e0 Mon Sep 17 00:00:00 2001 From: Luca Palmieri <20745048+LukeMathWalker@users.noreply.github.com> Date: Sat, 13 Apr 2024 21:38:35 +0200 Subject: [PATCH 1/2] Try CI From 4968d25c5ca9657fc884ee28e294d12e624065bd Mon Sep 17 00:00:00 2001 From: Luca Palmieri <20745048+LukeMathWalker@users.noreply.github.com> Date: Sat, 13 Apr 2024 21:43:08 +0200 Subject: [PATCH 2/2] Pass GitHub token --- .github/actions/create-check/action.yml | 5 ++++- .github/actions/finalize-check/action.yml | 5 ++++- .github/workflows/docs.yml | 10 ++++++++++ 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/.github/actions/create-check/action.yml b/.github/actions/create-check/action.yml index 02c5c2ac4..e2b10525b 100644 --- a/.github/actions/create-check/action.yml +++ b/.github/actions/create-check/action.yml @@ -13,6 +13,9 @@ inputs: run_id: description: 'Id of the run' required: true + github_token: + description: 'GitHub token' + required: true runs: using: "composite" steps: @@ -23,7 +26,7 @@ runs: workflow: ${{ inputs.workflow }} details_url: "Details [here](https://github.com/LukeMathWalker/pavex/actions/runs/${{ inputs.run_id }})" with: - github-token: ${{ secrets.GITHUB_TOKEN }} + github-token: ${{ inputs.GITHUB_TOKEN }} script: | const { data: pull } = await github.rest.pulls.get({ ...context.repo, diff --git a/.github/actions/finalize-check/action.yml b/.github/actions/finalize-check/action.yml index d4cee0ac5..96e9b67af 100644 --- a/.github/actions/finalize-check/action.yml +++ b/.github/actions/finalize-check/action.yml @@ -10,6 +10,9 @@ inputs: conclusion: description: 'Final status' required: true + github_token: + description: 'GitHub token' + required: true runs: using: "composite" steps: @@ -21,7 +24,7 @@ runs: job: ${{ inputs.job }} conclusion: ${{ inputs.conclusion }} with: - github-token: ${{ secrets.GITHUB_TOKEN }} + github-token: ${{ inputs.github_token }} script: | const { data: pull } = await github.rest.pulls.get({ ...context.repo, diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 85f106317..27c3e2ab2 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -37,6 +37,7 @@ jobs: job: "Build CLIs ${{ matrix.target }} (${{ matrix.os }})" workflow: "Build and store docs artifacts" run_id: ${{ github.run_id }} + github_token: ${{ secrets.GITHUB_TOKEN }} - name: Set BINARY_EXTENSION if: ${{ matrix.os != 'windows-2022' }} run: | @@ -72,6 +73,7 @@ jobs: pr_number: ${{ github.event.client_payload.pull_request.number }} job: "Build CLIs ${{ matrix.target }} (${{ matrix.os }})" conclusion: ${{ job.status }} + github_token: ${{ secrets.GITHUB_TOKEN }} build_tutorial_generator: runs-on: ubuntu-latest @@ -84,6 +86,7 @@ jobs: job: "Build tutorial generator" workflow: "Build and store docs artifacts" run_id: ${{ github.run_id }} + github_token: ${{ secrets.GITHUB_TOKEN }} - name: Install Rust uses: actions-rust-lang/setup-rust-toolchain@v1.6.0 - name: Cache dependencies @@ -105,6 +108,7 @@ jobs: pr_number: ${{ github.event.client_payload.pull_request.number }} job: "Build tutorial generator" conclusion: ${{ job.status }} + github_token: ${{ secrets.GITHUB_TOKEN }} tests: name: "Run tests ${{ matrix.target }} (${{ matrix.os }})" @@ -159,6 +163,7 @@ jobs: job: "Run tests ${{ matrix.target }} (${{ matrix.os }})" workflow: "Build and store docs artifacts" run_id: ${{ github.run_id }} + github_token: ${{ secrets.GITHUB_TOKEN }} - name: Set BINARY_EXTENSION if: ${{ matrix.os != 'windows-2022' }} run: | @@ -237,6 +242,7 @@ jobs: pr_number: ${{ github.event.client_payload.pull_request.number }} job: "Run tests ${{ matrix.target }} (${{ matrix.os }})" conclusion: ${{ job.status }} + github_token: ${{ secrets.GITHUB_TOKEN }} is_up_to_date: runs-on: ubuntu-latest @@ -279,6 +285,7 @@ jobs: job: "Check if up to date" workflow: "Build and store docs artifacts" run_id: ${{ github.run_id }} + github_token: ${{ secrets.GITHUB_TOKEN }} - name: Set git identity run: | git config --global user.name "GitHub Actions" @@ -335,6 +342,7 @@ jobs: pr_number: ${{ github.event.client_payload.pull_request.number }} job: "Check if up to date" conclusion: ${{ job.status }} + github_token: ${{ secrets.GITHUB_TOKEN }} build_docs: runs-on: ubuntu-latest @@ -347,6 +355,7 @@ jobs: job: "Build docs" workflow: "Build and store docs artifacts" run_id: ${{ github.run_id }} + github_token: ${{ secrets.GITHUB_TOKEN }} - name: Install Rust stable toolchain uses: actions-rust-lang/setup-rust-toolchain@v1.6.0 - name: Cache dependencies @@ -408,3 +417,4 @@ jobs: pr_number: ${{ github.event.client_payload.pull_request.number }} job: "Build docs" conclusion: ${{ job.status }} + github_token: ${{ secrets.GITHUB_TOKEN }}