Skip to content
Merged
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
10 changes: 6 additions & 4 deletions .github/templates/run-script-and-commit/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ inputs:
passphrase:
description: "Passphrase for the GPG key."
required: true
repo-path:
description: "Path to the repository."
default: ""
go-mod-path:
description: "Path to go.mod file. If the file exists, Go will be set up."
default: "go.mod"
required: false
branch:
description: "Branch to checkout."
Expand All @@ -39,13 +39,15 @@ runs:
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what repository is checked out here when this is called from a different repo?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

callee repo, for example cluster module repo

with:
fetch-depth: 0
fetch-tags: true
token: ${{ inputs.apix_bot_pat }}
ref: ${{ inputs.branch }}

- name: Set up Go
if: ${{ hashFiles(inputs.go-mod-path) != '' }}
uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c
with:
go-version-file: ${{ format('{0}go.mod', inputs.repo-path) }}
go-version-file: ${{ inputs.go-mod-path }}
- name: Run specified script
shell: bash
run: ${{ inputs.script_call }}
Expand Down