Skip to content

Commit

Permalink
chore: get GitHub Access token by gh auth token (#19471)
Browse files Browse the repository at this point in the history
* chore: get GitHub Access token by gh auth token

* ci: set AQUA_GITHUB_TOKEN

* chore: add cli/cli

* style: format

* chore: ignore error of gh auth token
  • Loading branch information
suzuki-shunsuke authored Jan 30, 2024
1 parent 0f529b3 commit aad9a80
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/wc-test-docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,9 @@ jobs:
AQUA_GITHUB_TOKEN: ${{github.token}}
- name: test GitHub Release
run: cmdx t suzuki-shunsuke/mkghtag
env:
AQUA_GITHUB_TOKEN: ${{github.token}}
- name: test cargo package
run: cmdx t bensadeh/tailspin
env:
AQUA_GITHUB_TOKEN: ${{github.token}}
1 change: 1 addition & 0 deletions aqua.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ packages:
- name: rhysd/[email protected]
- name: suzuki-shunsuke/[email protected]
- name: jqlang/[email protected]
- name: cli/[email protected]
5 changes: 5 additions & 0 deletions scripts/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ set -eu
container_name=${1:-aqua-registry}

token="${AQUA_GITHUB_TOKEN:-${GITHUB_TOKEN:-}}"
if [ -z "$token" ]; then
echo "[INFO] Get a GitHub Access token by gh auth token" >&2
# Ignore error
token=$(aqua exec -- gh auth token) || :
fi
envs=""
if [ -n "$token" ]; then
envs="-e GITHUB_TOKEN=$token"
Expand Down

0 comments on commit aad9a80

Please sign in to comment.