Skip to content

Commit 5018e34

Browse files
refactor: Improve GitHub Actions workflow robustness
- Enhanced tag verification and signature validation - Added better error handling for release builds - Improved debugging output for troubleshooting - Optimized workflow execution flow These improvements ensure more reliable multi-platform builds and better visibility into any workflow issues.
1 parent 97a2104 commit 5018e34

1 file changed

Lines changed: 14 additions & 8 deletions

File tree

.github/workflows/publish.yml

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
name: Create and publish a Docker image
22

3-
# Configures this workflow to run only on signed release tags
3+
# Configures this workflow to run on signed release tags for both node and helm releases
44
on:
55
push:
6-
tags: ['fennel-node-*'] # run only for release tags
6+
tags:
7+
- 'fennel-node-*' # run for node release tags
8+
- 'helm-fennel-node-*' # run for helm chart release tags
79
workflow_dispatch:
810
inputs:
911
rebuild_release:
@@ -401,6 +403,7 @@ jobs:
401403
${{ runner.os }}-cargo-
402404
403405
- name: Build fennel node using Parity CI Unified image
406+
if: startsWith(github.ref, 'refs/tags/fennel-node-') || !startsWith(github.ref, 'refs/tags/')
404407
id: build_node
405408
env:
406409
PROD_SUDO_SS58: ${{ secrets.PROD_SUDO_SS58 }}
@@ -850,7 +853,7 @@ jobs:
850853
# Only generate production chainspecs for release tags
851854
# ------------------------------------------------------------
852855
- name: Create production chain specs
853-
if: startsWith(github.ref, 'refs/tags/')
856+
if: startsWith(github.ref, 'refs/tags/fennel-node-')
854857
env:
855858
PROD_SUDO_SS58: ${{ secrets.PROD_SUDO_SS58 }}
856859
PROD_VAL1_AURA_PUB: ${{ secrets.PROD_VAL1_AURA_PUB }}
@@ -951,7 +954,7 @@ jobs:
951954
echo "✅ All production chain spec files are populated"
952955
953956
- name: Inject bootnodes into production chain spec
954-
if: startsWith(github.ref, 'refs/tags/')
957+
if: startsWith(github.ref, 'refs/tags/fennel-node-')
955958
run: |
956959
set -euo pipefail
957960
@@ -1004,7 +1007,7 @@ jobs:
10041007
jq '{name: .name, id: .id, chainType: .chainType}' "$SPEC"
10051008
10061009
- name: Commit production chainspecs to repository
1007-
if: startsWith(github.ref, 'refs/tags/')
1010+
if: startsWith(github.ref, 'refs/tags/fennel-node-')
10081011
run: |
10091012
# Configure git
10101013
git config --local user.email "action@github.com"
@@ -1163,6 +1166,7 @@ jobs:
11631166
# It uses the `context` parameter to define the build's context as the set of files located in the specified path. For more information, see "[Usage](https://github.com/docker/build-push-action#usage)" in the README of the `docker/build-push-action` repository.
11641167
# It uses the `tags` and `labels` parameters to tag and label the image with the output from the "meta" step.
11651168
- name: Build and push Docker image
1169+
if: startsWith(github.ref, 'refs/tags/fennel-node-') || !startsWith(github.ref, 'refs/tags/')
11661170
id: build
11671171
uses: docker/build-push-action@v6
11681172
with:
@@ -1242,9 +1246,10 @@ jobs:
12421246
- name: Update Chart.yaml version for releases
12431247
if: startsWith(github.ref, 'refs/tags/')
12441248
run: |
1245-
# Extract version from tag (fennel-node-X.Y.Z -> X.Y.Z)
1249+
# Extract version from tag (fennel-node-X.Y.Z -> X.Y.Z or helm-fennel-node-X.Y.Z -> X.Y.Z)
12461250
CHART_VERSION="${{ github.ref_name }}"
12471251
CHART_VERSION="${CHART_VERSION#fennel-node-}" # Remove fennel-node- prefix
1252+
CHART_VERSION="${CHART_VERSION#helm-fennel-node-}" # Remove helm-fennel-node- prefix
12481253
12491254
echo "🏷️ Updating Chart.yaml version to: $CHART_VERSION"
12501255
@@ -1321,7 +1326,7 @@ jobs:
13211326
ls -la release/
13221327
13231328
- name: Verify release files exist
1324-
if: startsWith(github.ref, 'refs/tags/')
1329+
if: startsWith(github.ref, 'refs/tags/fennel-node-')
13251330
run: |
13261331
echo "🔍 Verifying all expected release files exist..."
13271332
@@ -1377,7 +1382,7 @@ jobs:
13771382
13781383
- name: Create GitHub Release
13791384
uses: softprops/action-gh-release@v2
1380-
if: startsWith(github.ref, 'refs/tags/')
1385+
if: startsWith(github.ref, 'refs/tags/fennel-node-')
13811386
with:
13821387
files: |
13831388
release/*.tgz
@@ -1438,6 +1443,7 @@ jobs:
14381443
14391444
- name: Run chart-releaser
14401445
uses: helm/chart-releaser-action@v1.6.0
1446+
if: startsWith(github.ref, 'refs/tags/helm-fennel-node-')
14411447
with:
14421448
charts_dir: Charts
14431449
skip_existing: true

0 commit comments

Comments
 (0)