Bump mock-fs from 5.4.0 to 5.4.1 (#255) #510
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: 'build-test' | |
on: # rebuild any PRs and main branch changes | |
pull_request: | |
push: | |
branches: | |
- main | |
- 'releases/*' | |
jobs: | |
build: # make sure build/ci work properly | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- run: | | |
npm install | |
- run: | | |
npm run all | |
test-oidc: # make sure the action works on a clean machine without building | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
contents: read | |
strategy: | |
fail-fast: false | |
matrix: | |
roleToken: | |
- rg_oidc_akr_m17rp5g5mz25rvkctys6 | |
gem-server: | |
- 'https://rubygems.org' | |
include: | |
- roleToken: rg_oidc_akr_y6txf9nm3c4kttxgnsgg | |
gem-server: 'https://staging.rubygems.org' | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./ | |
with: | |
role-to-assume: '${{ matrix.roleToken }}' | |
gem-server: '${{ matrix.gem-server }}' | |
- name: Test token | |
run: | | |
curl -v --fail '${{ matrix.gem-server }}/api/v1/oidc/api_key_roles/${{ matrix.roleToken }}' -H 'Authorization: ${{ env.RUBYGEMS_API_KEY }}' | |
test-trusted-publisher: # make sure the action works on a clean machine without building | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
contents: read | |
strategy: | |
fail-fast: false | |
matrix: | |
gem-server: | |
- 'rubygems.org' | |
- 'staging.rubygems.org' | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./ | |
with: | |
gem-server: 'https://${{ matrix.gem-server }}' | |
audience: '${{ matrix.gem-server }}' | |
- name: Test token | |
run: | | |
output="$(curl -s -w "\n\n%{http_code}" -v -X POST 'https://${{ matrix.gem-server }}/api/v1/gems' -H 'Authorization: ${{ env.RUBYGEMS_API_KEY }}' -H 'Accept: application/json')" | |
expected="$(printf "RubyGems.org cannot process this gem.\nPlease try rebuilding it and installing it locally to make sure it's valid.\nError:\npackage metadata is missing\n\n\n422")" | |
test "$output" = "$expected" || (echo "$output" && exit 1) | |
test-all: | |
needs: [test-oidc, test-trusted-publisher] | |
runs-on: ubuntu-latest | |
steps: | |
- run: | | |
true |