Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass GitHub token #253

Merged
merged 2 commits into from
Apr 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/actions/create-check/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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,
Expand Down
5 changes: 4 additions & 1 deletion .github/actions/finalize-check/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ inputs:
conclusion:
description: 'Final status'
required: true
github_token:
description: 'GitHub token'
required: true
runs:
using: "composite"
steps:
Expand All @@ -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,
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down Expand Up @@ -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
Expand All @@ -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/[email protected]
- name: Cache dependencies
Expand All @@ -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 }})"
Expand Down Expand Up @@ -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: |
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand All @@ -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/[email protected]
- name: Cache dependencies
Expand Down Expand Up @@ -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 }}