-
Notifications
You must be signed in to change notification settings - Fork 115
/
action.yml
32 lines (30 loc) · 1.15 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
name: "Checkout a repository for a Go project"
description: "Checkout and setup the environment for a Go project"
inputs:
path:
# Same argument to https://github.com/actions/checkout.
description: "Relative path under $GITHUB_WORKSPACE to place the repository."
required: true
token:
description: "The token to use."
required: false
# Same default as https://github.com/actions/checkout/blob/main/action.yml#L24.
default: ${{ github.token }}
go-version:
description: "The Go version to use, as expected by https://github.com/actions/setup-go."
required: true
runs:
using: "composite"
steps:
# Note: this assumes to top-level re-usable workflow
# has checkout'ed the builder repository using
# `.github/actions/secure-builder-checkout`.
- name: Checkout the repository with user ref
uses: ./__BUILDER_CHECKOUT_DIR__/.github/actions/secure-project-checkout
with:
token: ${{ inputs.token }}
path: ${{ inputs.path }}
- name: Set up Go environment
uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0
with:
go-version: ${{ inputs.go-version }}