-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (52 loc) · 1.53 KB
/
demo.yaml
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: Demo for non-standard ref names issue
on:
workflow_dispatch:
jobs:
push_ref:
name: Create non-standard ref name
runs-on: ubuntu-latest
outputs:
ref: ${{ steps.push.outputs.ref }}
permissions:
contents: write
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Create dummy commit, and push as non-standard ref
id: push
run: |
git config user.name 'github-actions[bot]'
git config user.email '41898282+github-actions[bot]@users.noreply.github.com'
echo "Dummy" > dummy
git add dummy
git commit -m 'Dummy commit (run id ${{ github.run_id }})'
git push origin HEAD:$REF
echo "ref=$REF" >> "$GITHUB_OUTPUT"
env:
REF: "refs/deploy-bot/${{ github.run_id }}/merge"
checkout_old_working:
name: Checkout non-standard ref name (working @4.1.6)
runs-on: ubuntu-latest
needs: push_ref
steps:
- name: Checkout repo
uses: actions/checkout@v4.1.6
with:
ref: ${{ needs.push_ref.outputs.ref }}
- name: Show latest commit
run: |
git log -1
cat dummy
checkout_new_failing:
name: Checkout non-standard ref name (failing @ > 4.1.6)
runs-on: ubuntu-latest
needs: push_ref
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
ref: ${{ needs.push_ref.outputs.ref }}
- name: Show latest commit
run: |
git log -1
cat dummy