-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yml
39 lines (38 loc) · 1.25 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
38
39
name: Checkout and setup
description: Simple GitHub Action that checks out the repository and sets up the environment.
inputs:
secrets:
description: 'Secrets required for `setup` action.'
required: false
variables:
description: 'Non-secret variables required for `setup` action.'
required: false
ref:
description: "Git ref to checkout. Maps to the `ref` argument to `actions/checkout@v4`."
required: false
setup:
description: "Ref containing the `setup` action. Uses the default (or `inputs.ref`) branch if not provided."
required: false
submodules:
description: "Passes through to `actions/checkout`."
required: false
runs:
using: 'composite'
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ inputs.ref }}
submodules: ${{ inputs.submodules }}
- name: Checkout the setup action
if: ${{ inputs.setup }}
shell: "/usr/bin/bash -e {0}"
run: |
git fetch origin "${{ inputs.setup }}"
git checkout FETCH_HEAD -- .github/actions/setup
git rm -r --cached .github
- name: Setup environment
uses: ./.github/actions/setup
with:
secrets: ${{ inputs.secrets }}
variables: ${{ inputs.variables }}