Skip to content

[pre-commit.ci] pre-commit autoupdate #156

[pre-commit.ci] pre-commit autoupdate

[pre-commit.ci] pre-commit autoupdate #156

Workflow file for this run

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 }}'