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 9a57e89
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 1 deletion.
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
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: 'Setup asset of Github Releases'
description: 'GitHub Action for gh-setup'
outputs:
inputs:
github-token:
description: The GitHub token
default: ${{ github.token }}
Expand Down
Empty file modified scripts/entrypoint.sh
100644 → 100755
Empty file.
3 changes: 3 additions & 0 deletions scripts/install-gh-setup.sh
100644 → 100755
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
100644 → 100755
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 9a57e89

Please sign in to comment.