-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathaction.yml
40 lines (38 loc) · 1.3 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
name: Clean checkout
description: Clears workspace and checks out requested branch
runs:
using: composite
steps:
- name: Cleanup workspace
shell: bash
run: |
rm -rf '${{github.workspace}}'
- name: Init
shell: bash
working-directory: '${{runner.workspace}}'
run: |
git init '${{github.workspace}}'
- name: Add origin
shell: bash
working-directory: '${{github.workspace}}'
run: |
git remote add origin '[email protected]:${{github.repository}}'
- name: Checkout branch or PR
shell: bash
working-directory: '${{github.workspace}}'
run: |
git -c protocol.version=2 fetch --no-tags --prune --no-recurse-submodules --depth=1 origin '${{github.sha}}'
git checkout --force '${{github.sha}}'
git config user.name "Actions Runner"
git config user.email "[email protected]"
- name: Update submodules
shell: bash
working-directory: '${{github.workspace}}'
run: |
git submodule sync --recursive
git -c protocol.version=2 submodule update --init --force --depth=1 --recursive
- name: Fetch private actions
shell: bash
working-directory: '${{github.workspace}}'
run: |
git clone '[email protected]:TransitApp/actions' '.github/actions'