Skip to content

Commit 4e96124

Browse files
template-injection: actions/checkout workarounds.
1 parent bacb00c commit 4e96124

File tree

6 files changed

+52
-26
lines changed

6 files changed

+52
-26
lines changed

.github/workflows/api-test-lint-deploy.yaml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,11 @@ jobs:
9090
# https://github.com/actions/checkout/issues/290
9191
- name: 'Fix actions/checkout odd handling of tags'
9292
if: startsWith(github.ref, 'refs/tags')
93+
env:
94+
REF: ${{ github.ref }}
9395
run: |
94-
git fetch -f origin ${{ github.ref }}:${{ github.ref }}
95-
git checkout ${{ github.ref }}
96+
git fetch -f origin "$REF:$REF"
97+
git checkout "$REF"
9698
- uses: 'actions/setup-node@v4'
9799
with:
98100
node-version: '22.11.0'
@@ -143,9 +145,11 @@ jobs:
143145
persist-credentials: false
144146
- name: 'Fix actions/checkout odd handling of tags'
145147
if: startsWith(github.ref, 'refs/tags')
148+
env:
149+
REF: ${{ github.ref }}
146150
run: |
147-
git fetch -f origin ${{ github.ref }}:${{ github.ref }}
148-
git checkout ${{ github.ref }}
151+
git fetch -f origin "$REF:$REF"
152+
git checkout "$REF"
149153
- uses: 'actions/setup-python@v4'
150154
with:
151155
python-version: '3.10'
@@ -204,9 +208,11 @@ jobs:
204208
# https://github.com/actions/checkout/issues/290
205209
- name: 'Fix actions/checkout odd handling of tags'
206210
if: startsWith(github.ref, 'refs/tags')
211+
env:
212+
REF: ${{ github.ref }}
207213
run: |
208-
git fetch -f origin ${{ github.ref }}:${{ github.ref }}
209-
git checkout ${{ github.ref }}
214+
git fetch -f origin "$REF:$REF"
215+
git checkout "$REF"
210216
- uses: 'actions/setup-node@v4'
211217
with:
212218
node-version: '22.11.0'

.github/workflows/components-test-build-deploy.yaml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -157,9 +157,11 @@ jobs:
157157
# https://github.com/actions/checkout/issues/290
158158
- name: 'Fix actions/checkout odd handling of tags'
159159
if: startsWith(github.ref, 'refs/tags')
160+
env:
161+
REF: ${{ github.ref }}
160162
run: |
161-
git fetch -f origin ${{ github.ref }}:${{ github.ref }}
162-
git checkout ${{ github.ref }}
163+
git fetch -f origin "$REF:$REF"
164+
git checkout "$REF"
163165
- uses: 'actions/setup-node@v4'
164166
with:
165167
node-version: '22.11.0'
@@ -199,9 +201,11 @@ jobs:
199201
# https://github.com/actions/checkout/issues/290
200202
- name: 'Fix actions/checkout odd handling of tags'
201203
if: startsWith(github.ref, 'refs/tags')
204+
env:
205+
REF: ${{ github.ref }}
202206
run: |
203-
git fetch -f origin ${{ github.ref }}:${{ github.ref }}
204-
git checkout ${{ github.ref }}
207+
git fetch -f origin "$REF:$REF"
208+
git checkout "$REF"
205209
- uses: 'actions/setup-node@v4'
206210
with:
207211
node-version: '22.11.0'

.github/workflows/docs-build.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,11 @@ jobs:
4747
# https://github.com/actions/checkout/issues/290
4848
- name: 'Fix actions/checkout odd handling of tags'
4949
if: startsWith(github.ref, 'refs/tags')
50+
env:
51+
REF: ${{ github.ref }}
5052
run: |
51-
git fetch -f origin ${{ github.ref }}:${{ github.ref }}
52-
git checkout ${{ github.ref }}
53+
git fetch -f origin "$REF:$REF"
54+
git checkout "$REF"
5355
- uses: 'actions/setup-node@v4'
5456
with:
5557
node-version: '22.11.0'

.github/workflows/http-docs-build.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,11 @@ jobs:
4747
# https://github.com/actions/checkout/issues/290
4848
- name: 'Fix actions/checkout odd handling of tags'
4949
if: startsWith(github.ref, 'refs/tags')
50+
env:
51+
REF: ${{ github.ref }}
5052
run: |
51-
git fetch -f origin ${{ github.ref }}:${{ github.ref }}
52-
git checkout ${{ github.ref }}
53+
git fetch -f origin "$REF:$REF"
54+
git checkout "$REF"
5355
- uses: 'actions/setup-python@v3'
5456
with:
5557
python-version: '3.10'

.github/workflows/ll-test-build-deploy.yaml

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,11 @@ jobs:
5151
# https://github.com/actions/checkout/issues/290
5252
- name: 'Fix actions/checkout odd handling of tags'
5353
if: startsWith(github.ref, 'refs/tags')
54+
env:
55+
REF: ${{ github.ref }}
5456
run: |
55-
git fetch -f origin ${{ github.ref }}:${{ github.ref }}
56-
git checkout ${{ github.ref }}
57+
git fetch -f origin "$REF:$REF"
58+
git checkout "$REF"
5759
- name: 'install libudev for usb-detection'
5860
run: |
5961
# WORKAROUND: Remove microsoft debian repo due to https://github.com/microsoft/linux-package-repositories/issues/130. Remove line below after it is resolved
@@ -93,9 +95,11 @@ jobs:
9395
# https://github.com/actions/checkout/issues/290
9496
- name: 'Fix actions/checkout odd handling of tags'
9597
if: startsWith(github.ref, 'refs/tags')
98+
env:
99+
REF: ${{ github.ref }}
96100
run: |
97-
git fetch -f origin ${{ github.ref }}:${{ github.ref }}
98-
git checkout ${{ github.ref }}
101+
git fetch -f origin "$REF:$REF"
102+
git checkout "$REF"
99103
- uses: 'actions/setup-node@v4'
100104
with:
101105
node-version: '22.11.0'
@@ -137,9 +141,11 @@ jobs:
137141
# https://github.com/actions/checkout/issues/290
138142
- name: 'Fix actions/checkout odd handling of tags'
139143
if: startsWith(github.ref, 'refs/tags')
144+
env:
145+
REF: ${{ github.ref }}
140146
run: |
141-
git fetch -f origin ${{ github.ref }}:${{ github.ref }}
142-
git checkout ${{ github.ref }}
147+
git fetch -f origin "$REF:$REF"
148+
git checkout "$REF"
143149
- uses: 'actions/setup-node@v4'
144150
with:
145151
node-version: '22.11.0'
@@ -185,9 +191,11 @@ jobs:
185191
# https://github.com/actions/checkout/issues/290
186192
- name: 'Fix actions/checkout odd handling of tags'
187193
if: startsWith(github.ref, 'refs/tags')
194+
env:
195+
REF: ${{ github.ref }}
188196
run: |
189-
git fetch -f origin ${{ github.ref }}:${{ github.ref }}
190-
git checkout ${{ github.ref }}
197+
git fetch -f origin "$REF:$REF"
198+
git checkout "$REF"
191199
- uses: 'actions/setup-node@v4'
192200
with:
193201
node-version: '22.11.0'

.github/workflows/shared-data-test-lint-deploy.yaml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -163,9 +163,11 @@ jobs:
163163
# https://github.com/actions/checkout/issues/290
164164
- name: 'Fix actions/checkout odd handling of tags'
165165
if: startsWith(github.ref, 'refs/tags')
166+
env:
167+
REF: ${{ github.ref }}
166168
run: |
167-
git fetch -f origin ${{ github.ref }}:${{ github.ref }}
168-
git checkout ${{ github.ref }}
169+
git fetch -f origin "$REF:$REF"
170+
git checkout "$REF"
169171
- uses: 'actions/setup-node@v4'
170172
with:
171173
node-version: '22.11.0'
@@ -237,9 +239,11 @@ jobs:
237239
# https://github.com/actions/checkout/issues/290
238240
- name: 'Fix actions/checkout odd handling of tags'
239241
if: startsWith(github.ref, 'refs/tags')
242+
env:
243+
REF: ${{ github.ref }}
240244
run: |
241-
git fetch -f origin ${{ github.ref }}:${{ github.ref }}
242-
git checkout ${{ github.ref }}
245+
git fetch -f origin "$REF:$REF"
246+
git checkout "$REF"
243247
- uses: 'actions/setup-node@v4'
244248
with:
245249
node-version: '22.11.0'

0 commit comments

Comments
 (0)