Skip to content

Commit 98dc50b

Browse files
committed
chore(ci): remove emojis from workflows to comply with repo standards
- Keep messaging clear and consistent
1 parent d3d40b0 commit 98dc50b

File tree

7 files changed

+123
-1092
lines changed

7 files changed

+123
-1092
lines changed

.github/workflows/helm.yaml.disabled

Lines changed: 0 additions & 102 deletions
This file was deleted.

.github/workflows/prepare-release.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,12 @@ jobs:
5151
# in the unified-release.yaml workflow. This manual step is no longer needed.
5252
- name: Chart Update Notice
5353
run: |
54-
echo "ℹ️ Chart version updates are now handled automatically by release-please"
55-
echo "📋 The unified-release.yaml workflow will update:"
54+
echo "Chart version updates are now handled automatically by release-please"
55+
echo "The unified-release.yaml workflow will update:"
5656
echo " - Chart appVersion to match application version"
5757
echo " - Chart version to match application version (without 'v' prefix)"
5858
echo " - Image tag in values.yaml"
59-
echo "No manual chart updates required"
59+
echo "No manual chart updates required"
6060
- name: Generate updated helm reference
6161
# Needs to run after chart update, before docs update
6262
run: |
@@ -101,13 +101,13 @@ jobs:
101101
base: main
102102
title: "chore(release): Updates for ${{ env.GITOPS_VERSION }}"
103103
body: |
104-
## ⚠️ Breaking changes
104+
## Breaking changes
105105
Describe any breaking changes here, or delete this block
106106
107-
## ✍️ Action required
107+
## Action required
108108
Describe any user facing actions here, or delete this block.
109109
110-
## 💸 Features and improvements
110+
## Features and improvements
111111
Describe any user facing changes here, or delete this block.
112112
113113
Examples of user facing changes:

.github/workflows/release-please.yaml

Lines changed: 116 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,79 @@
11
---
2-
name: release-please-legacy
2+
name: Unified Release
33

4-
# DISABLED: This workflow has been replaced by unified-release.yaml
5-
# The unified workflow handles both application and Helm chart releases synchronously
64
on:
7-
workflow_dispatch:
8-
inputs:
9-
force_run:
10-
description: 'Force run legacy workflow (for emergency use only)'
11-
required: true
12-
default: 'false'
13-
type: choice
14-
options:
15-
- 'false'
16-
- 'true'
5+
push:
6+
branches:
7+
- main
178

189
permissions:
1910
contents: read
2011

2112
jobs:
22-
legacy-workflow-notice:
23-
runs-on: ubuntu-latest
24-
if: "${{ github.event.inputs.force_run != 'true' }}"
25-
steps:
26-
- name: Legacy workflow notice
27-
run: |
28-
echo "❌ This legacy workflow has been disabled"
29-
echo "✅ Use the unified-release.yaml workflow instead"
30-
echo "🔄 The unified workflow synchronizes both app and Helm chart releases"
31-
echo ""
32-
echo "If you need to run this legacy workflow for emergency purposes:"
33-
echo "1. Re-run this workflow"
34-
echo "2. Set 'force_run' input to 'true'"
35-
exit 1
36-
3713
release-please:
3814
runs-on: ubuntu-latest
3915
permissions:
4016
contents: write
4117
pull-requests: write
42-
if: "${{ github.repository_owner == 'weaveworks' && github.event.inputs.force_run == 'true' }}"
18+
if: "${{ github.repository_owner == 'weaveworks' && github.ref_name == 'main' }}"
4319
outputs:
4420
release_created: ${{ steps.release-please.outputs.release_created }}
4521
tag_name: ${{ steps.release-please.outputs.tag_name }}
4622
version: ${{ steps.release-please.outputs.version }}
23+
major: ${{ steps.release-please.outputs.major }}
24+
minor: ${{ steps.release-please.outputs.minor }}
25+
patch: ${{ steps.release-please.outputs.patch }}
4726
steps:
4827
- name: Release Please
4928
id: release-please
5029
uses: googleapis/release-please-action@a02a34c4d625f9be7cb89156071d8567266a2445 # v4.2.0
5130
with:
5231
token: ${{ secrets.WEAVE_GITOPS_BOT_ACCESS_TOKEN }}
5332

54-
publish-npm-package:
33+
validate-versions:
5534
needs: release-please
5635
runs-on: ubuntu-latest
36+
if: "${{ needs.release-please.outputs.release_created }}"
37+
steps:
38+
- name: Checkout
39+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
40+
41+
- name: Validate chart version synchronization
42+
run: |
43+
APP_VERSION="${{ needs.release-please.outputs.version }}"
44+
CHART_APP_VERSION=$(yq e '.appVersion' charts/gitops-server/Chart.yaml)
45+
CHART_VERSION=$(yq e '.version' charts/gitops-server/Chart.yaml)
46+
IMAGE_TAG=$(yq e '.image.tag' charts/gitops-server/values.yaml)
47+
48+
echo "Application Version: $APP_VERSION"
49+
echo "Chart AppVersion: $CHART_APP_VERSION"
50+
echo "Chart Version: $CHART_VERSION"
51+
echo "Image Tag: $IMAGE_TAG"
52+
53+
# Validate that chart appVersion matches application version
54+
if [[ "$CHART_APP_VERSION" != "$APP_VERSION" ]]; then
55+
echo "Error: Chart appVersion ($CHART_APP_VERSION) does not match application version ($APP_VERSION)"
56+
exit 1
57+
fi
58+
59+
# Validate that image tag matches application version
60+
if [[ "$IMAGE_TAG" != "$APP_VERSION" ]]; then
61+
echo "Error: Image tag ($IMAGE_TAG) does not match application version ($APP_VERSION)"
62+
exit 1
63+
fi
64+
65+
# Validate that chart version follows expected pattern (remove 'v' prefix from app version)
66+
EXPECTED_CHART_VERSION=$(echo "$APP_VERSION" | sed 's/^v//')
67+
if [[ "$CHART_VERSION" != "$EXPECTED_CHART_VERSION" ]]; then
68+
echo "Error: Chart version ($CHART_VERSION) does not match expected version ($EXPECTED_CHART_VERSION)"
69+
exit 1
70+
fi
71+
72+
echo "All versions are synchronized correctly"
73+
74+
publish-npm-package:
75+
needs: [release-please, validate-versions]
76+
runs-on: ubuntu-latest
5777
permissions:
5878
packages: write # needed for GitHub Packages registry access
5979
if: "${{ needs.release-please.outputs.release_created }}"
@@ -72,7 +92,7 @@ jobs:
7292
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7393

7494
build-and-push-image:
75-
needs: release-please
95+
needs: [release-please, validate-versions]
7696
uses: ./.github/workflows/build-push-image.yaml
7797
with:
7898
file: gitops-server.dockerfile
@@ -91,48 +111,81 @@ jobs:
91111
if: "${{ needs.release-please.outputs.release_created }}"
92112

93113
build-and-push-chart:
94-
needs:
95-
- release-please
96-
- build-and-push-image # as we want to push chart when images are available
114+
needs: [release-please, validate-versions, build-and-push-image]
97115
runs-on: ubuntu-latest
98116
permissions:
99117
contents: read # for actions/checkout to fetch code
100118
id-token: write # for Cosign to be able to sign chart with GHA token
101119
packages: write # for helm to push OCI chart
102-
if: "${{ needs.release-please.outputs['charts/gitops-server--release_created'] }}"
120+
if: "${{ needs.release-please.outputs.release_created }}"
103121
steps:
104122
- name: Checkout
105123
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
124+
125+
- name: Validate chart before packaging
126+
run: |
127+
APP_VERSION="${{ needs.release-please.outputs.version }}"
128+
CHART_VERSION=$(yq e '.version' charts/gitops-server/Chart.yaml)
129+
130+
echo "Packaging chart version: $CHART_VERSION for app version: $APP_VERSION"
131+
132+
# Validate chart syntax
133+
helm lint charts/gitops-server/
134+
106135
- name: Package chart
107136
run: |
108137
mkdir helm-release
109138
helm package charts/gitops-server/ -d helm-release
139+
140+
# List packaged chart for verification
141+
ls -la helm-release/
142+
110143
- name: Log in to the Container registry
111144
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
112145
with:
113146
registry: ghcr.io
114147
username: ${{ github.actor }}
115148
password: ${{ secrets.GITHUB_TOKEN }}
149+
116150
- name: Publish chart
117151
id: publish-chart
118152
run: |
119-
helm push helm-release/weave-gitops-${{ needs.release-please.outputs['charts/gitops-server--version'] }}.tgz \
120-
oci://ghcr.io/weaveworks/charts &> helm-release/push-metadata.txt
153+
CHART_VERSION=$(yq e '.version' charts/gitops-server/Chart.yaml)
154+
CHART_FILE="helm-release/weave-gitops-${CHART_VERSION}.tgz"
155+
156+
if [[ ! -f "$CHART_FILE" ]]; then
157+
echo "Error: Chart file $CHART_FILE not found"
158+
ls -la helm-release/
159+
exit 1
160+
fi
161+
162+
echo "Publishing chart: $CHART_FILE"
163+
helm push "$CHART_FILE" oci://ghcr.io/weaveworks/charts &> helm-release/push-metadata.txt
164+
165+
# Extract digest for signing
121166
CHART_DIGEST=$(awk '/Digest: /{print $2}' helm-release/push-metadata.txt)
167+
echo "Chart digest: $CHART_DIGEST"
122168
echo "digest=$CHART_DIGEST" >> $GITHUB_OUTPUT
169+
170+
# Display push metadata for debugging
171+
echo "Push metadata:"
172+
cat helm-release/push-metadata.txt
173+
123174
- name: Install cosign
124175
uses: sigstore/cosign-installer@398d4b0eeef1380460a10c8013a76f728fb906ac # v3.9.1
176+
125177
- name: Keyless signing of chart
126178
run: |
127179
cosign sign --yes ghcr.io/weaveworks/charts@${{ steps.publish-chart.outputs.digest }}
180+
128181
- name: Verify the chart signing
129182
run: |
130183
cosign verify ghcr.io/weaveworks/charts@${{ steps.publish-chart.outputs.digest }} \
131184
--certificate-identity "https://github.com/${{ github.workflow_ref }}" \
132185
--certificate-oidc-issuer "https://token.actions.githubusercontent.com" | jq .
133186
134187
goreleaser:
135-
needs: release-please
188+
needs: [release-please, validate-versions]
136189
runs-on: ubuntu-latest
137190
permissions:
138191
contents: read # for actions/checkout to fetch code
@@ -160,3 +213,28 @@ jobs:
160213
env:
161214
GITHUB_TOKEN: ${{ secrets.WEAVE_GITOPS_BOT_ACCESS_TOKEN }}
162215
BOT_TOKEN: ${{ secrets.WEAVE_GITOPS_BOT_ACCESS_TOKEN }}
216+
217+
create-release-summary:
218+
needs: [release-please, validate-versions, publish-npm-package, build-and-push-image, build-and-push-chart, goreleaser]
219+
runs-on: ubuntu-latest
220+
if: "${{ needs.release-please.outputs.release_created }}"
221+
steps:
222+
- name: Create release summary
223+
run: |
224+
echo "# Release Summary" >> $GITHUB_STEP_SUMMARY
225+
echo "" >> $GITHUB_STEP_SUMMARY
226+
echo "**Version:** ${{ needs.release-please.outputs.version }}" >> $GITHUB_STEP_SUMMARY
227+
echo "**Tag:** ${{ needs.release-please.outputs.tag_name }}" >> $GITHUB_STEP_SUMMARY
228+
echo "" >> $GITHUB_STEP_SUMMARY
229+
echo "## Components Released" >> $GITHUB_STEP_SUMMARY
230+
echo "- Application binaries (GoReleaser)" >> $GITHUB_STEP_SUMMARY
231+
echo "- Container images (ghcr.io/weaveworks/wego-app)" >> $GITHUB_STEP_SUMMARY
232+
echo "- Helm chart (ghcr.io/weaveworks/charts)" >> $GITHUB_STEP_SUMMARY
233+
echo "- NPM package (@weaveworks scope)" >> $GITHUB_STEP_SUMMARY
234+
echo "" >> $GITHUB_STEP_SUMMARY
235+
echo "## Version Synchronization" >> $GITHUB_STEP_SUMMARY
236+
echo "All components have been released with synchronized versions:" >> $GITHUB_STEP_SUMMARY
237+
echo "- Application: ${{ needs.release-please.outputs.version }}" >> $GITHUB_STEP_SUMMARY
238+
echo "- Chart AppVersion: ${{ needs.release-please.outputs.version }}" >> $GITHUB_STEP_SUMMARY
239+
echo "- Chart Version: $(echo '${{ needs.release-please.outputs.version }}' | sed 's/^v//')" >> $GITHUB_STEP_SUMMARY
240+
echo "- Image Tag: ${{ needs.release-please.outputs.version }}" >> $GITHUB_STEP_SUMMARY

0 commit comments

Comments
 (0)