[pre-commit.ci] pre-commit autoupdate (#44) #147
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
workflow_dispatch: | |
jobs: | |
fail: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout [${{ github.repository }}] | |
uses: actions/checkout@v4 | |
# Expect to fail in the absence of the required permissions | |
# This job should be successful though | |
- name: Mint token | |
id: mint | |
continue-on-error: true | |
uses: ./ | |
# Should be skipped as the mint step is expected to fail | |
- name: Check | |
if: ${{ steps.mint.outcome == 'success' }} | |
run: | | |
echo '${{ steps.mint.outputs.api-token }}' | |
exit 1 | |
pass: | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
runs-on: ${{ matrix.os }} | |
# https://github.com/glassechidna/ghaoidc/issues/1 | |
permissions: | |
id-token: write | |
contents: read | |
steps: | |
- name: Checkout [${{ github.repository }}] | |
uses: actions/checkout@v4 | |
# The minting will only be successful if | |
# a) the permission are set correctly (see above) | |
# b) the yml file is registered as trusted publisher on pypi | |
- name: Mint token | |
id: mint | |
uses: ./ | |
# Note that the api-token is masked. It will displayed as *** | |
- name: Check | |
run: echo '${{ steps.mint.outputs.api-token }}' |