-
Notifications
You must be signed in to change notification settings - Fork 2
54 lines (45 loc) · 1.52 KB
/
soperator.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: "Build soperator terraform release"
on:
push:
branches:
- main
- "dev/soperator"
paths:
- "soperator/**"
permissions:
contents: read
jobs:
build:
permissions:
contents: write # for softprops/action-gh-release to create GitHub release
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
with:
egress-policy: audit
- name: Checkout repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Build release
run: |
cd soperator
make release
ls -la releases/
- name: Get Version
id: get_version
run: |
echo "VERSION=$(cat soperator/VERSION)" >> $GITHUB_ENV
echo "FILE_VERSION=$(cat soperator/VERSION | tr '.' '_' | tr '-' '_')" >> $GITHUB_ENV
- name: Create GitHub Release and Upload terraform tarball
uses: softprops/action-gh-release@c062e08bd532815e2082a85e87e3ef29c3e6d191 # v2.0.8
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: soperator-v${{ env.VERSION }}
name: Soperator terraform v${{ env.VERSION }}
draft: false
prerelease: false
files: |
soperator/releases/slurm_operator_tf_${{ env.FILE_VERSION }}.tar.gz
- name: Cleanup
run: rm -rf soperator/releases/slurm_operator_tf_${{ env.FILE_VERSION }}.tar.gz