-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
38 lines (37 loc) · 1.21 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
33
34
35
36
37
name: "Wait for ref to be available"
description: "If using github as a mirror, this action will pause until the requested reference is available"
inputs:
repository:
description: 'Repository name with owner. For example, actions/checkout'
default: ${{ github.repository }}
fetch-depth:
description: 'Number of commits to fetch. 0 indicates all history for all branches and tags.'
default: 2
gerrit-ref:
description: >
Reference in the form of refs/changes/0000/00
ref:
description: >
The branch, tag or SHA to checkout. When checking out the repository that
triggered a workflow, this defaults to the reference or SHA for that
event. Otherwise, uses the default branch.
required: false
default: ${{ github.sha }}
token:
default: ${{ github.token }}
runs:
using: composite
steps:
- uses: actions/checkout@v4
with:
repository: ${{ inputs.repository }}
fetch-depth: ${{ inputs.fetch-depth }}
token: ${{ inputs.token }}
ref: ${{ inputs.ref }}
- id: gerrit-checkout
shell: bash
run: |
until git fetch origin ${{ inputs.gerrit-ref }}; do
sleep 10
done
git checkout FETCH_HEAD