forked from defenseunicorns/uds-k3d
-
Notifications
You must be signed in to change notification settings - Fork 0
99 lines (81 loc) · 3.4 KB
/
tag-and-release.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
name: Publish UDS Capability
on:
push:
branches:
- main
jobs:
tag-new-version:
runs-on: ubuntu-latest
permissions: write-all
outputs:
release_created: ${{ steps.release-flag.outputs.release_created }}
steps:
- name: Create Release Tag
id: tag
uses: googleapis/release-please-action@7987652d64b4581673a76e33ad5e98e3dd56832f # v4.1.3
with:
command: manifest # use configs in release-please-config.json
- id: release-flag
run: echo "release_created=${{ steps.tag.outputs.release_created || false }}" >> $GITHUB_OUTPUT
publish-uds-package:
needs: tag-new-version
if: ${{ needs.tag-new-version.outputs.release_created == 'true'}}
runs-on: ubuntu-latest
strategy:
matrix:
k3s_image_repository: ["rancher/k3s"]
k3s_image_version:
["v1.28.8-k3s1", "v1.29.8-k3s1", "v1.30.4-k3s1", "v1.31.0-k3s1"]
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4
- name: Setup UDS
uses: defenseunicorns/uds-common/.github/actions/setup@e3008473beab00b12a94f9fcc7340124338d5c08 # v0.13.1
with:
registry1Username: ${{ secrets.IRON_BANK_ROBOT_USERNAME }}
registry1Password: ${{ secrets.IRON_BANK_ROBOT_PASSWORD }}
ghToken: ${{ secrets.GITHUB_TOKEN }}
- name: Publish the base capability
run: |
uds zarf package create --confirm -a arm64 -o oci://ghcr.io/justinthelaw/packages \
--set K3S_IMAGE_REPOSITORY=${{ matrix.k3s_image_repository }} \
--set K3S_IMAGE_VERSION=${{ matrix.k3s_image_version }}
uds zarf package create --confirm -a amd64 -o oci://ghcr.io/justinthelaw/packages \
--set K3S_IMAGE_REPOSITORY=${{ matrix.k3s_image_repository }} \
--set K3S_IMAGE_VERSION=${{ matrix.k3s_image_version }}
publish-uds-cuda-package:
needs: tag-new-version
if: ${{ needs.tag-new-version.outputs.release_created == 'true'}}
runs-on: ubuntu-latest
strategy:
matrix:
k3s_image_repository: ["rancher/k3s"]
k3s_image_version:
["v1.28.8-k3s1", "v1.29.8-k3s1", "v1.30.4-k3s1", "v1.31.0-k3s1"]
cuda_image_version:
[
11.8.0-base-ubuntu22.04,
12.1.0-base-ubuntu22.04,
12.5.0-base-ubuntu22.04,
]
steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4
- uses: docker/setup-buildx-action@8026d2bc3645ea78b0d2544766a1225eb5691f89 # v3.7.0
- name: Setup UDS
uses: defenseunicorns/uds-common/.github/actions/setup@e3008473beab00b12a94f9fcc7340124338d5c08 # v0.13.1
with:
registry1Username: ${{ secrets.IRON_BANK_ROBOT_USERNAME }}
registry1Password: ${{ secrets.IRON_BANK_ROBOT_PASSWORD }}
ghToken: ${{ secrets.GITHUB_TOKEN }}
- name: Publish the CUDA K3s image
run: |
uds run publish-cuda-image \
--set K3S_IMAGE_REPOSITORY=${{ matrix.k3s_image_repository }} \
--set K3S_IMAGE_VERSION="${{ matrix.k3s_image_version }}" \
--set CUDA_IMAGE_VERSION="${{ matrix.cuda_image_version }}" \
--no-progress
- name: Publish the CUDA capability
run: |
uds zarf package create --confirm -a amd64 -o oci://ghcr.io/justinthelaw/packages --flavor cuda