Skip to content

Commit 2039f4a

Browse files
authored
chore(actions): add job to shorten github commit SHA
1 parent 5eec091 commit 2039f4a

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

.github/workflows/debug.yml

+11-5
Original file line numberDiff line numberDiff line change
@@ -5,33 +5,39 @@ on:
55
pull_request:
66

77
jobs:
8+
get-version:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Trim commit SHA
12+
id: trim_sha
13+
run: echo "trimmed_sha='r$(echo ${{ github.sha }} | cut -c1-7)'" >> $GITHUB_ENV
814
build:
915
strategy:
1016
matrix:
1117
include:
1218
- job-name: Windows x86_64
1319
target: x86_64-pc-windows-msvc
1420
runs-on: windows-latest
15-
artifact-name: pesde-debug-${{ github.sha }}-windows-x86_64
21+
artifact-name: pesde-debug-${{ needs.get-version.outputs.trimmed_sha }}-windows-x86_64
1622

1723
- job-name: Linux x86_64
1824
target: x86_64-unknown-linux-gnu
1925
runs-on: ubuntu-latest
20-
artifact-name: pesde-debug-${{ github.sha }}-linux-x86_64
26+
artifact-name: pesde-debug-${{ needs.get-version.outputs.trimmed_sha }}-linux-x86_64
2127

2228
- job-name: macOS x86_64
2329
target: x86_64-apple-darwin
2430
runs-on: macos-13
25-
artifact-name: pesde-debug-${{ github.sha }}-macos-x86_64
31+
artifact-name: pesde-debug-${{ needs.get-version.outputs.trimmed_sha }}-macos-x86_64
2632

2733
- job-name: macOS aarch64
2834
target: aarch64-apple-darwin
2935
runs-on: macos-latest
30-
artifact-name: pesde-debug-${{ github.sha }}-macos-aarch64
36+
artifact-name: pesde-debug-${{ needs.get-version.outputs.trimmed_sha }}-macos-aarch64
3137

3238
name: Build for ${{ matrix.job-name }}
3339
runs-on: ${{ matrix.runs-on }}
34-
40+
needs: get-version
3541
steps:
3642
- name: Checkout
3743
uses: actions/checkout@v4

0 commit comments

Comments
 (0)