File tree Expand file tree Collapse file tree 3 files changed +61
-9
lines changed Expand file tree Collapse file tree 3 files changed +61
-9
lines changed Original file line number Diff line number Diff line change
1
+ # Copyright The Linux Foundation and each contributor to LFX.
2
+ # SPDX-License-Identifier: MIT
3
+ ---
4
+ name : Publish Container Branch
5
+
6
+ " on " :
7
+ pull_request :
8
+ branches :
9
+ - main
10
+
11
+ permissions :
12
+ contents : read
13
+
14
+ jobs :
15
+ publish :
16
+ name : Publish Container
17
+ if : ${{ github.event.pull_request.head.repo.fork == false }}
18
+ runs-on : ubuntu-latest
19
+ permissions :
20
+ contents : read
21
+ packages : write
22
+ steps :
23
+ - uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
24
+ - uses : actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5
25
+ with :
26
+ go-version-file : go.mod
27
+ - uses : ko-build/setup-ko@d006021bd0c28d1ce33a07e7943d48b079944c8d # v0.9
28
+ with :
29
+ version : v0.18.0
30
+ - name : Prepare container tag
31
+ id : container_tag
32
+ env :
33
+ HEAD_REF : " ${{ github.head_ref }}"
34
+ run : |
35
+ container_tag=$(echo "$HEAD_REF" | sed 's/[^_0-9a-zA-Z]/-/g' | cut -c -127)
36
+ echo tag="$container_tag" >> "$GITHUB_OUTPUT"
37
+ - name : Build project-api for PR
38
+ run : |
39
+ ko build github.com/linuxfoundation/lfx-v2-project-service/cmd/project-api \
40
+ -B \
41
+ --platform linux/amd64,linux/arm64 \
42
+ -t ${{ github.sha }} \
43
+ -t ${{ steps.container_tag.outputs.tag }} \
44
+ --sbom spdx
45
+ - name : Build root-project-setup for PR
46
+ run : |
47
+ ko build github.com/linuxfoundation/lfx-v2-project-service/scripts/root-project-setup \
48
+ -B \
49
+ --platform linux/amd64,linux/arm64 \
50
+ -t ${{ github.sha }} \
51
+ -t ${{ steps.container_tag.outputs.tag }} \
52
+ --sbom spdx
Original file line number Diff line number Diff line change @@ -20,13 +20,13 @@ jobs:
20
20
contents : read
21
21
packages : write
22
22
steps :
23
- - uses : actions/checkout@v4
24
- - uses : actions/setup-go@v5
23
+ - uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
24
+ - uses : actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5
25
25
with :
26
26
go-version-file : go.mod
27
- - uses : ko-build/setup-ko@v0.8
27
+ - uses : ko-build/setup-ko@d006021bd0c28d1ce33a07e7943d48b079944c8d # v0.9
28
28
with :
29
- version : v0.17.1
29
+ version : v0.18.0
30
30
- run : |
31
31
ko build github.com/linuxfoundation/lfx-v2-project-service/cmd/project-api \
32
32
-B \
Original file line number Diff line number Diff line change 28
28
chart_version : ${{ steps.prepare.outputs.chart_version }}
29
29
steps :
30
30
- name : Checkout repository
31
- uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
31
+ uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
32
32
33
33
- name : Prepare versions and chart name
34
34
id : prepare
@@ -44,14 +44,14 @@ jobs:
44
44
} >> "$GITHUB_OUTPUT"
45
45
46
46
- name : Setup Go
47
- uses : actions/setup-go@v5
47
+ uses : actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5
48
48
with :
49
49
go-version-file : go.mod
50
50
51
51
- name : Setup Ko
52
- uses : ko-build/setup-ko@v0.8
52
+ uses : ko-build/setup-ko@d006021bd0c28d1ce33a07e7943d48b079944c8d # v0.9
53
53
with :
54
- version : v0.17.1
54
+ version : v0.18.0
55
55
56
56
- name : Build and publish project-api image
57
57
run : |
85
85
image_name : ${{ steps.publish-ghcr.outputs.image_name }}
86
86
steps :
87
87
- name : Checkout repository
88
- uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
88
+ uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
89
89
90
90
- name : Publish Chart to GHCR
91
91
id : publish-ghcr
You can’t perform that action at this time.
0 commit comments