From 8f7ab41331731760ff0488dacebc2ad6ae052d50 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Tue, 28 Jan 2025 19:04:42 -0800 Subject: [PATCH] Add input for custom gh token --- action.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 9ff1670..a80bb74 100644 --- a/action.yml +++ b/action.yml @@ -8,6 +8,9 @@ inputs: bin: description: Name of binary; default = same as crate name required: false + github_token: + description: Access token for connecting to GitHub API for artifact attestation; normally the ephemeral {{github.token}} or {{secrets.GITHUB_TOKEN}} when used in a GitHub workflow, or a personal access token when run by Act Runner + default: ${{github.token}} runs: using: composite steps: @@ -27,7 +30,7 @@ runs: - name: Verify artifact attestation run: gh attestation verify --owner dtolnay ${{steps.cargo.outputs.dir}}/${{steps.inputs.outputs.bin}} env: - GH_TOKEN: ${{github.token}} + GH_TOKEN: ${{inputs.github_token}} shell: bash - name: Set executable bit run: chmod +x ${{steps.cargo.outputs.dir}}/${{steps.inputs.outputs.bin}}