CI: Make formatting dispatch workflows on verilator/verilator
Use the CI GitHub APP for authentication in the format job. This should correctly trigger workflows after the push of the formatting.
This commit is contained in:
parent
bee58510e7
commit
64dbd4abcc
|
|
@ -9,8 +9,7 @@ on:
|
||||||
- 'dependabot/**' # Avoid duplicates: only run the PR, not the push
|
- 'dependabot/**' # Avoid duplicates: only run the PR, not the push
|
||||||
pull_request_target:
|
pull_request_target:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
jobs:
|
jobs:
|
||||||
format:
|
format:
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
|
|
@ -18,12 +17,21 @@ jobs:
|
||||||
env:
|
env:
|
||||||
CI_OS_NAME: linux
|
CI_OS_NAME: linux
|
||||||
CI_RUNS_ON: ubuntu-24.04
|
CI_RUNS_ON: ubuntu-24.04
|
||||||
CI_COMMIT: ${{ github.sha }}
|
|
||||||
steps:
|
steps:
|
||||||
|
# Use the Verilator CI app to push formatting - this will trigger
|
||||||
|
# workflows and consequently cancel in progress jobs if necessary
|
||||||
|
- name: Generate access token
|
||||||
|
if: ${{ github.repository == 'verilator/verilator' }}
|
||||||
|
id: generate-token
|
||||||
|
uses: actions/create-github-app-token@v2.1.4
|
||||||
|
with:
|
||||||
|
app-id: ${{ vars.VERILATOR_CI_ID }}
|
||||||
|
private-key: ${{ secrets.VERILATOR_CI_KEY }}
|
||||||
|
permission-contents: write
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v5
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ github.repository == 'verilator/verilator' && steps.generate-token.outputs.token || secrets.GITHUB_TOKEN }}
|
||||||
- name: Install packages for build
|
- name: Install packages for build
|
||||||
env:
|
env:
|
||||||
CI_BUILD_STAGE_NAME: build
|
CI_BUILD_STAGE_NAME: build
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue