Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,6 @@ jobs:
run: go install golang.org/x/vuln/cmd/govulncheck@v1.8.0
- name: Run govulncheck
run: govulncheck ./...

zizmor:
uses: h13/.github/.github/workflows/ci-zizmor.yml@c807de1510e8d223f352555ddcbf6a1a78fe51eb # v3.1.0
11 changes: 9 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,22 +59,27 @@ runs:

- name: Install gtm-users
shell: bash
run: go install github.com/h13/gtm-users/cmd/gtm-users@${{ github.action_ref || 'latest' }}
env:
ACTION_REF: ${{ github.action_ref || 'latest' }}
run: go install "github.com/h13/gtm-users/cmd/gtm-users@${ACTION_REF}"

- name: Write credentials file
if: inputs.credentials != ''
id: credfile
shell: bash
env:
CREDENTIALS_CONTENT: ${{ inputs.credentials }}
run: |
CRED_FILE=$(mktemp)
printf '%s' "$CREDENTIALS_CONTENT" > "$CRED_FILE"
echo "GTMUSERS_CREDENTIALS_FILE=$CRED_FILE" >> "$GITHUB_ENV"
# A step output instead of GITHUB_ENV: nothing else can inject into it.
echo "file=$CRED_FILE" >> "$GITHUB_OUTPUT"

- name: Run gtm-users
id: run
shell: bash
env:
GTMUSERS_CREDENTIALS_FILE: ${{ steps.credfile.outputs.file }}
INPUT_COMMAND: ${{ inputs.command }}
INPUT_CONFIG: ${{ inputs.config }}
INPUT_FORMAT: ${{ inputs.format }}
Expand Down Expand Up @@ -138,6 +143,8 @@ runs:
- name: Cleanup credentials
if: always() && inputs.credentials != ''
shell: bash
env:
GTMUSERS_CREDENTIALS_FILE: ${{ steps.credfile.outputs.file }}
run: rm -f "$GTMUSERS_CREDENTIALS_FILE"

- name: Comment on PR
Expand Down