Skip to content

Commit

Permalink
✨ (action.yaml): add read_checksum_token input to allow custom token …
Browse files Browse the repository at this point in the history
…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
  • Loading branch information
iwata authored Sep 26, 2024
1 parent 638f3e8 commit f8df4ca
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,27 @@ inputs:
skip_push:
required: false
default: false
read_checksum_token:
required: false
default: '' # When this input is an empty string, it doesn't override `AQUA_GITHUB_TOKEN`.
description: |
This token overrides `AQUA_GITHUB_TOKEN` to executes `aqua update-checksum`. It must have `contents:read` permission about all repositories
in tools managed by `aqua`. This input is useful to fetch checksum from private repositories.
runs:
using: composite
steps:
- shell: bash
working-directory: ${{inputs.working_directory}}
run: aqua update-checksum -deep
if: inputs.prune != 'true'
env:
AQUA_GITHUB_TOKEN: ${{ (inputs.read_checksum_token != '') && inputs.read_checksum_token || env.AQUA_GITHUB_TOKEN }}
- shell: bash
working-directory: ${{inputs.working_directory}}
run: aqua update-checksum -deep -prune
if: inputs.prune == 'true'
env:
AQUA_GITHUB_TOKEN: ${{ (inputs.read_checksum_token != '') && inputs.read_checksum_token || env.AQUA_GITHUB_TOKEN }}

- shell: bash
id: find
Expand Down

0 comments on commit f8df4ca

Please sign in to comment.