Skip to content

Commit

Permalink
Add action test
Browse files Browse the repository at this point in the history
  • Loading branch information
k1LoW committed Feb 12, 2023
1 parent a3af5ec commit d947d04
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,13 @@ jobs:
run: |
go run cmd/gh-setup/main.go --repo k1LoW/gh-setup
gh-setup -v
shell: bash

- name: Run setup as a action (1/2)
uses: .
with:
repo: k1LoW/tbls

- name: Run setup as a action (2/2)
run: tbls version
shell: bash
3 changes: 3 additions & 0 deletions scripts/install-gh-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
set -e

token=${GH_SETUP_GITHUB_TOKEN}
if [ -z "${token}" ]; then
token=${GITHUB_TOKEN}
fi
repo="k1LoW/gh-setup"
tag="$(curl -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${token}" https://api.github.com/repos/${repo}/releases/latest | grep tag_name | awk -F':' '{print $2}' | awk -F'\"' '{print $2}')"
arch="$(uname -m)"
Expand Down
3 changes: 3 additions & 0 deletions scripts/run-gh-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ set -e

bin=${GH_SETUP_BIN}
token=${GH_SETUP_GITHUB_TOKEN}
if [ -z "${token}" ]; then
token=${GITHUB_TOKEN}
fi
repo=${GH_SETUP_REPO}
bindir=${GH_SETUP_BIN_DIR}
force=${GH_SETUP_FORCE}
Expand Down

0 comments on commit d947d04

Please sign in to comment.