File tree Expand file tree Collapse file tree 9 files changed +32
-10
lines changed Expand file tree Collapse file tree 9 files changed +32
-10
lines changed Original file line number Diff line number Diff line change 37
37
path : repo
38
38
# Patch releases need the full history to find the latest tag.
39
39
fetch-depth : ${{ inputs.publishType == 'patch' && '0' || '1' }}
40
+ persist-credentials : false
40
41
41
42
- name : setup go 1.x
42
43
uses : actions/setup-go@v5
@@ -125,7 +126,7 @@ jobs:
125
126
IS_LATEST_RELEASE=false
126
127
127
128
# Create version suffix.
128
- case "${{ inputs.publishType }} " in
129
+ case "$PUBLISH_TYPE " in
129
130
"official")
130
131
PRERELEASE_PARAM="IMAGE_CUSTOMIZER_VERSION_PREVIEW="
131
132
IS_LATEST_RELEASE="true"
@@ -162,6 +163,8 @@ jobs:
162
163
163
164
# Print version.
164
165
echo "Version: $PACKAGE_VERSION"
166
+ env :
167
+ PUBLISH_TYPE : ${{ inputs.publishType }}
165
168
166
169
- name : Setup Notation CLI
167
170
uses : notaryproject/notation-action/setup@v1
@@ -173,9 +176,11 @@ jobs:
173
176
./repo/toolkit/tools/imagecustomizer/container/notation/notation-setup.sh
174
177
175
178
CONTAINER_TAG="imagecustomizer:build"
176
- ./repo/toolkit/tools/imagecustomizer/container/build-container.sh -t "$CONTAINER_TAG" -a "${{ inputs.arch }} " -b
179
+ ./repo/toolkit/tools/imagecustomizer/container/build-container.sh -t "$CONTAINER_TAG" -a "$ARCH " -b
177
180
178
181
docker image save "$CONTAINER_TAG" | gzip > "imagecustomizer.tar.gz"
182
+ env :
183
+ ARCH : ${{ inputs.arch }}
179
184
180
185
- name : Upload version artifact
181
186
if : inputs.arch == 'amd64'
Original file line number Diff line number Diff line change 15
15
steps :
16
16
- name : Checkout
17
17
uses : actions/checkout@v4
18
+ with :
19
+ persist-credentials : false
18
20
19
21
- name : Setup ruby
20
22
uses : ruby/setup-ruby@4a9ddd6f338a97768b8006bf671dfbad383215f4 # v1.207.0
@@ -29,17 +31,21 @@ jobs:
29
31
uses : actions/configure-pages@v5
30
32
31
33
- name : Build with Jekyll
32
- run : bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }} "
34
+ run : bundle exec jekyll build --baseurl "$PAGES_PATH "
33
35
working-directory : ./docs
36
+ env :
37
+ PAGES_PATH : ${{ steps.pages.outputs.base_path }}
34
38
35
39
- name : Check links
36
40
run : |
37
41
bundle exec htmlproofer \
38
42
--disable-external \
39
43
--assume_extension '.html' \
40
- --swap-urls ' ^${{ steps.pages.outputs.base_path }} /:/' \
44
+ --swap-urls " ^${PAGES_PATH} /:/" \
41
45
./_site
42
46
working-directory : ./docs
47
+ env :
48
+ PAGES_PATH : ${{ steps.pages.outputs.base_path }}
43
49
44
50
- name : Upload site assets as artifact
45
51
id : deployment
Original file line number Diff line number Diff line change 22
22
uses : actions/checkout@v4
23
23
with :
24
24
path : repo
25
+ persist-credentials : true
25
26
26
27
- name : Download build artifacts
27
28
uses : actions/download-artifact@v4
Original file line number Diff line number Diff line change @@ -45,11 +45,13 @@ jobs:
45
45
git
46
46
47
47
# grub2-pc is only available on x86.
48
- if [[ "${{ inputs.hostArch }} " == "amd64" ]]; then
48
+ if [[ "$HOST_ARCH " == "amd64" ]]; then
49
49
sudo tdnf install -y grub2-pc
50
50
fi
51
51
52
52
sudo tdnf list installed
53
+ env :
54
+ HOST_ARCH : ${{ inputs.hostArch }}
53
55
54
56
- name : Install prerequisites (Ubuntu 24.04)
55
57
if : inputs.hostDistro == 'ubuntu2404'
68
70
uses : actions/checkout@v4
69
71
with :
70
72
path : repo
73
+ persist-credentials : false
71
74
72
75
- name : Test setup
73
76
run : |
Original file line number Diff line number Diff line change 1
1
# Copyright (c) Microsoft Corporation.
2
2
# Licensed under the MIT License.
3
3
4
- name : Fork release branch
4
+ name : Open bump version PR
5
5
6
6
permissions :
7
7
# Create release branch and publish release.
26
26
uses : actions/checkout@v4
27
27
with :
28
28
path : repo
29
+ persist-credentials : true
29
30
30
31
- name : Open bump version PR
31
32
env :
Original file line number Diff line number Diff line change 25
25
path : out
26
26
27
27
- name : Login to GHCR
28
- run : echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u "${{ github.actor } }" --password-stdin
28
+ run : echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u "${GITHUB_ACTOR }" --password-stdin
29
29
30
30
- name : Install cosign
31
31
Original file line number Diff line number Diff line change 26
26
uses : actions/checkout@v4
27
27
with :
28
28
path : repo
29
+ persist-credentials : true
29
30
30
31
- name : Download build artifacts
31
32
uses : actions/download-artifact@v4
35
36
- name : Publish release
36
37
env :
37
38
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
39
+ IS_LATEST_RELEASE : ${{ inputs.isLatestRelease }}
38
40
run : |
39
41
set -x
40
42
52
54
mv ../out/binary-amd64/imagecustomizer.tar.gz ../release/imagecustomizer-amd64.tar.gz
53
55
mv ../out/binary-arm64/imagecustomizer.tar.gz ../release/imagecustomizer-arm64.tar.gz
54
56
55
- gh release create --latest="${{ inputs.isLatestRelease }} " --title "${TAG}" --notes "" "${TAG}" ../release/*
57
+ gh release create --latest="$IS_LATEST_RELEASE " --title "${TAG}" --notes "" "${TAG}" ../release/*
56
58
57
59
# Push to stable branch.
58
- if [ "${{ inputs.isLatestRelease }} " == "true" ]; then
60
+ if [ "$IS_LATEST_RELEASE " == "true" ]; then
59
61
git push --force origin HEAD:stable
60
62
fi
Original file line number Diff line number Diff line change @@ -51,11 +51,13 @@ jobs:
51
51
git azure-cli
52
52
53
53
# grub2-pc is only available on x86.
54
- if [[ "${{ inputs.hostArch }} " == "amd64" ]]; then
54
+ if [[ "$HOST_ARCH " == "amd64" ]]; then
55
55
sudo tdnf install -y grub2-pc
56
56
fi
57
57
58
58
sudo tdnf list installed
59
+ env :
60
+ HOST_ARCH : ${{ inputs.hostArch }}
59
61
60
62
- name : Install prerequisites (Ubuntu 24.04)
61
63
if : inputs.hostDistro == 'ubuntu2404'
83
85
uses : actions/checkout@v4
84
86
with :
85
87
path : repo
88
+ persist-credentials : false
86
89
87
90
- name : Download base images
88
91
run : |
Original file line number Diff line number Diff line change 86
86
uses : actions/checkout@v4
87
87
with :
88
88
path : repo
89
+ persist-credentials : false
89
90
90
91
- name : Download base images
91
92
run : |
You can’t perform that action at this time.
0 commit comments