Skip to content

Commit f8df4ca

Browse files
authored
✨ (action.yaml): add read_checksum_token input to allow custom token for aqua update-checksum (#79)
* ✨ (action.yaml): add read_checksum_token input to allow custom token for aqua update-checksum 💡 (action.yaml): update GITHUB_TOKEN environment variable to use read_checksum_token if provided, enhancing flexibility in permissions * 📝 (action.yaml): update documentation for read_checksum_token input to clarify its behavior and purpose ♻️ (action.yaml): refactor environment variable from GITHUB_TOKEN to AQUA_GITHUB_TOKEN for consistency and clarity in the action's execution context
1 parent 638f3e8 commit f8df4ca

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

action.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,27 @@ inputs:
99
skip_push:
1010
required: false
1111
default: false
12+
read_checksum_token:
13+
required: false
14+
default: '' # When this input is an empty string, it doesn't override `AQUA_GITHUB_TOKEN`.
15+
description: |
16+
This token overrides `AQUA_GITHUB_TOKEN` to executes `aqua update-checksum`. It must have `contents:read` permission about all repositories
17+
in tools managed by `aqua`. This input is useful to fetch checksum from private repositories.
1218
runs:
1319
using: composite
1420
steps:
1521
- shell: bash
1622
working-directory: ${{inputs.working_directory}}
1723
run: aqua update-checksum -deep
1824
if: inputs.prune != 'true'
25+
env:
26+
AQUA_GITHUB_TOKEN: ${{ (inputs.read_checksum_token != '') && inputs.read_checksum_token || env.AQUA_GITHUB_TOKEN }}
1927
- shell: bash
2028
working-directory: ${{inputs.working_directory}}
2129
run: aqua update-checksum -deep -prune
2230
if: inputs.prune == 'true'
31+
env:
32+
AQUA_GITHUB_TOKEN: ${{ (inputs.read_checksum_token != '') && inputs.read_checksum_token || env.AQUA_GITHUB_TOKEN }}
2333

2434
- shell: bash
2535
id: find

0 commit comments

Comments
 (0)