Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a git-ref parameter to specify checkout git reference #26

Merged
merged 4 commits into from
Jan 6, 2023
Merged
Show file tree
Hide file tree
Changes from 2 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
7 changes: 6 additions & 1 deletion .github/workflows/community.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ on:
description: 'setup-go Go Version'
required: true
type: string
git-ref:
description: 'branch, tag or SHA to checkout'
required: false
type: string
secrets:
gpg-private-key:
description: 'GPG Private Key'
Expand All @@ -25,8 +29,9 @@ jobs:
Release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
uses: actions/checkout@v3
SBGoods marked this conversation as resolved.
Show resolved Hide resolved
with:
ref: ${{ inputs.git-ref }}
fetch-depth: 0
- uses: actions/setup-go@v3
with:
Expand Down
12 changes: 11 additions & 1 deletion .github/workflows/hashicorp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ on:
description: 'Product Version (e.g. v1.2.3 or github.ref_name)'
required: true
type: string
git-ref:
description: 'branch, tag or SHA to checkout'
required: false
type: string

secrets:
hc-releases-github-token:
Expand Down Expand Up @@ -70,10 +74,16 @@ jobs:
# Custom runners range in size from 4 core to 64 core and sizes `small` through `xl` are supported
runs-on: [custom, linux, large]
steps:
- uses: actions/checkout@v3
- if: inputs.git-ref == ''
SBGoods marked this conversation as resolved.
Show resolved Hide resolved
uses: actions/checkout@v3
with:
# Allow tag to be fetched when ref is a commit
fetch-depth: 0
- if: inputs.git-ref != ''
uses: actions/checkout@v3
with:
ref: ${{ inputs.git-ref }}
fetch-depth: 0
- uses: actions/setup-go@v3
with:
go-version: ${{ inputs.setup-go-version }}
Expand Down