Skip to content

Commit c2760ed

Browse files
authored
Merge pull request #2 from snazy/releasey-workflow-review
Releasey workflow review
2 parents 9b7d9e2 + f65458d commit c2760ed

File tree

5 files changed

+25
-29
lines changed

5 files changed

+25
-29
lines changed

.github/workflows/release-1-create-release-branch.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141

4242
steps:
4343
- name: Checkout repository
44-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
44+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
4545
with:
4646
# Fetch full history for proper branch operations
4747
fetch-depth: 0

.github/workflows/release-2-update-release-candidate.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737

3838
steps:
3939
- name: Checkout repository
40-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
40+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
4141
with:
4242
# Fetch full history. Branch operations require this.
4343
fetch-depth: 0
@@ -140,7 +140,7 @@ jobs:
140140
echo "All GitHub checks are passing for commit \`${current_commit}\`" >> $GITHUB_STEP_SUMMARY
141141
142142
- name: Set up Java
143-
uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4
143+
uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5
144144
with:
145145
distribution: 'temurin'
146146
java-version: '21'

.github/workflows/release-3-build-and-publish-artifacts.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242

4343
steps:
4444
- name: Checkout repository
45-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
45+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
4646
with:
4747
fetch-depth: 0
4848

@@ -115,7 +115,7 @@ jobs:
115115

116116
steps:
117117
- name: Checkout repository
118-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
118+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
119119
with:
120120
fetch-depth: 0
121121

@@ -128,13 +128,13 @@ jobs:
128128
echo "LIBS_DIR=$(pwd)/releasey/libs" >> $GITHUB_ENV
129129
130130
- name: Set up Java
131-
uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4
131+
uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5
132132
with:
133133
distribution: 'temurin'
134134
java-version: '21'
135135

136136
- name: Import GPG key
137-
uses: crazy-max/ghaction-import-gpg@v6
137+
uses: crazy-max/ghaction-import-gpg@e89d40939c28e39f97cf32126055eeae86ba74ec # v6.3.0
138138
with:
139139
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
140140
passphrase: ${{ secrets.GPG_PASSPHRASE }}
@@ -234,7 +234,7 @@ jobs:
234234

235235
steps:
236236
- name: Checkout repository
237-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
237+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
238238
with:
239239
fetch-depth: 0
240240

@@ -247,7 +247,7 @@ jobs:
247247
echo "LIBS_DIR=$(pwd)/releasey/libs" >> $GITHUB_ENV
248248
249249
- name: Set up Java
250-
uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4
250+
uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5
251251
with:
252252
distribution: 'temurin'
253253
java-version: '21'
@@ -296,7 +296,7 @@ jobs:
296296

297297
steps:
298298
- name: Checkout repository
299-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
299+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
300300
with:
301301
fetch-depth: 0
302302

@@ -309,7 +309,7 @@ jobs:
309309
echo "LIBS_DIR=$(pwd)/releasey/libs" >> $GITHUB_ENV
310310
311311
- name: Set up Helm
312-
uses: azure/setup-helm@fe7b79cd5ee1e45176fcad797de68ecaf3ca4814 # v4
312+
uses: azure/setup-helm@1a275c3b69536ee54be43f2070a358922e12c8d4 # v4.3.1
313313
with:
314314
version: 'latest'
315315

@@ -320,7 +320,7 @@ jobs:
320320
helm plugin list
321321
322322
- name: Import GPG key
323-
uses: crazy-max/ghaction-import-gpg@v6
323+
uses: crazy-max/ghaction-import-gpg@e89d40939c28e39f97cf32126055eeae86ba74ec # v6.3.0
324324
with:
325325
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
326326
passphrase: ${{ secrets.GPG_PASSPHRASE }}

.github/workflows/release-4-publish-release.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141

4242
steps:
4343
- name: Checkout repository
44-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
44+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
4545
with:
4646
# Fetch full history for proper branch operations
4747
fetch-depth: 0
@@ -192,7 +192,7 @@ jobs:
192192
EOT
193193
194194
- name: Set up Helm
195-
uses: azure/setup-helm@fe7b79cd5ee1e45176fcad797de68ecaf3ca4814 # v4
195+
uses: azure/setup-helm@1a275c3b69536ee54be43f2070a358922e12c8d4 # v4.3.1
196196
with:
197197
version: 'latest'
198198

@@ -241,17 +241,15 @@ jobs:
241241
242242
243243
- name: Set up Java
244-
uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4
244+
uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5
245245
with:
246246
distribution: 'temurin'
247247
java-version: '21'
248248

249249
- name: Log in to Docker Hub
250250
if: env.DRY_RUN == '0'
251-
uses: docker/login-action@v3
252-
with:
253-
username: ${{ secrets.DOCKERHUB_USERNAME }}
254-
password: ${{ secrets.DOCKERHUB_TOKEN }}
251+
run: |
252+
echo "${{ secrets.DOCKERHUB_TOKEN }}" | docker login ghcr.io -u "${{ secrets.DOCKERHUB_USERNAME }}" --password-stdin
255253
256254
- name: Publish Polaris Server Docker image to Docker Hub
257255
run: |

releasey/libs/_version.sh

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,8 @@ function validate_and_extract_polaris_version {
8888

8989
function update_version {
9090
local version="$1"
91-
local current_version
92-
current_version=$(cat "$VERSION_FILE")
9391
update_version_txt "${version}"
94-
update_helm_version "${current_version}" "${version}"
92+
update_helm_version "${version}"
9593
}
9694

9795
function update_version_txt {
@@ -107,17 +105,17 @@ function update_version_txt {
107105
}
108106

109107
function update_helm_version {
110-
local old_version="$1"
111-
local new_version="$2"
112-
exec_process sed -i~ "s/${old_version}/${new_version}/g" "$HELM_CHART_YAML_FILE"
113-
exec_process sed -i~ "s/${old_version}/${new_version}/g" "$HELM_README_FILE"
108+
local new_version="$1"
109+
exec_process sed -E -i~ "s/^version: .+/version: ${new_version}/g" "$HELM_CHART_YAML_FILE"
110+
exec_process sed -E -i~ "s/^appVersion: .+/appVersion: ${new_version}/g" "$HELM_CHART_YAML_FILE"
111+
exec_process sed -E -i~ "s/[0-9]+[.][0-9]+([.][0-9]+)?(-incubating)-SNAPSHOT/${new_version}/g" "$HELM_README_FILE"
114112
# The readme file may contain version with double dash for shields.io badges
115113
# We need a second `sed` command to ensure that the version replacement preserves this double-dash syntax.
116114
local current_version_with_dash
117115
local version_with_dash
118-
current_version_with_dash="$(echo "${old_version//-/--}")"
119-
version_with_dash="$(echo "$version//-/--}")"
120-
exec_process sed -i~ "s/${current_version_with_dash}/${version_with_dash}/" "$HELM_README_FILE"
116+
current_version_with_dash="${old_version//-/--}"
117+
version_with_dash="${version//-/--}"
118+
exec_process sed -E -i~ "s/[0-9]+[.][0-9]+([.][0-9]+)?(--incubating)--SNAPSHOT/${version_with_dash}/g" "$HELM_README_FILE"
121119
}
122120

123121
function find_next_rc_number {

0 commit comments

Comments
 (0)