Skip to content

Commit 73be6e5

Browse files
committed
ci: Normalise slash-containing github.head_ref values
This fixes CI on InfiniTimeOrg#2121. Signed-off-by: Dom Rodriguez <shymega@shymega.org.uk>
1 parent f7c87a7 commit 73be6e5

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

.github/workflows/main.yml

+10-5
Original file line numberDiff line numberDiff line change
@@ -46,25 +46,30 @@ jobs:
4646
# Unzip the package because Upload Artifact will zip up the files
4747
- name: Unzip DFU package
4848
run: unzip ./build/output/pinetime-mcuboot-app-dfu-*.zip -d ./build/output/pinetime-mcuboot-app-dfu
49+
- name: Set ref_name, but replace slashes with dashes.
50+
shell: bash
51+
env:
52+
ref_name: ${{ github.ref_name }}
53+
run: echo "REF_NAME=${ref_name//\//-}" >> $GITHUB_ENV
4954
- name: Upload DFU artifacts
5055
uses: actions/upload-artifact@v3
5156
with:
52-
name: InfiniTime DFU ${{ github.head_ref }}
57+
name: InfiniTime DFU ${{ env.REF_NAME }}
5358
path: ./build/output/pinetime-mcuboot-app-dfu/*
5459
- name: Upload MCUBoot image artifacts
5560
uses: actions/upload-artifact@v3
5661
with:
57-
name: InfiniTime MCUBoot image ${{ github.head_ref }}
62+
name: InfiniTime MCUBoot image ${{ env.REF_NAME }}
5863
path: ./build/output/pinetime-mcuboot-app-image-*.bin
5964
- name: Upload standalone ELF artifacts
6065
uses: actions/upload-artifact@v3
6166
with:
62-
name: InfiniTime image ${{ github.head_ref }}
67+
name: InfiniTime image ${{ env.REF_NAME }}
6368
path: ./build/output/src/pinetime-app-*.out
6469
- name: Upload resources artifacts
6570
uses: actions/upload-artifact@v3
6671
with:
67-
name: InfiniTime resources ${{ github.head_ref }}
72+
name: InfiniTime resources ${{ env.REF_NAME }}
6873
path: ./build/output/infinitime-resources-*.zip
6974

7075
build-simulator:
@@ -105,7 +110,7 @@ jobs:
105110
- name: Upload simulator executable
106111
uses: actions/upload-artifact@v3
107112
with:
108-
name: infinisim-${{ github.head_ref }}
113+
name: infinisim-${{ env.REF_NAME }}
109114
path: build_lv_sim/infinisim
110115

111116
get-base-ref-size:

0 commit comments

Comments
 (0)