Skip to content

Commit

Permalink
Merge pull request #47 from k1LoW/fix-action
Browse files Browse the repository at this point in the history
Support `--strict` in Action
  • Loading branch information
k1LoW authored Feb 15, 2023
2 parents d9d01af + bb8636b commit 3756bba
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ jobs:
with:
repo: k1LoW/tbls
force: true
gh-setup-version: v0.8.0
strict: true
gh-setup-version: v0.8.2

- name: Run setup as a action (2/2)
run: tbls version
Expand All @@ -82,7 +83,8 @@ jobs:
github-token: ''
repo: k1LoW/colr
force: true
gh-setup-version: v0.8.0
strict: true
gh-setup-version: v0.8.2

- name: Run setup as a action (no credentials) (2/2)
run: colr -v
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ $ gh extension install k1LoW/gh-grep
# arch: amd64
# bin-match: tbls
# force: true
# strict: true
# gh-setup-version: latest
-
name: Run tbls
Expand Down
13 changes: 11 additions & 2 deletions scripts/run-gh-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,18 @@ match=${GH_SETUP_MATCH}
bin_dir=${GH_SETUP_BIN_DIR}
bin_match=${GH_SETUP_BIN_MATCH}
force=${GH_SETUP_FORCE}
strict=${GH_SETUP_STRICT}

if [ -z "${force}" ]; then
${bin} --repo ${repo} --version=${version} --os=${os} --arch=${arch} --bin-dir=${bin_dir} --bin-match=${bin_match}
if [ -z "${strict}" ]; then
${bin} --repo ${repo} --version=${version} --os=${os} --arch=${arch} --bin-dir=${bin_dir} --bin-match=${bin_match}
else
${bin} --repo ${repo} --version=${version} --os=${os} --arch=${arch} --bin-dir=${bin_dir} --bin-match=${bin_match}
fi
else
${bin} --repo ${repo} --version=${version} --os=${os} --arch=${arch} --bin-dir=${bin_dir} --bin-match=${bin_match} --force
if [ -z "${strict}" ]; then
${bin} --repo ${repo} --version=${version} --os=${os} --arch=${arch} --bin-dir=${bin_dir} --bin-match=${bin_match} --force
else
${bin} --repo ${repo} --version=${version} --os=${os} --arch=${arch} --bin-dir=${bin_dir} --bin-match=${bin_match} --force --strict
fi
fi

0 comments on commit 3756bba

Please sign in to comment.