Skip to content

Commit dd7194e

Browse files
committed
add git tags and validations
1 parent 04981df commit dd7194e

File tree

1 file changed

+55
-50
lines changed

1 file changed

+55
-50
lines changed

.github/workflows/push-artifacts.yaml

Lines changed: 55 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,60 @@ jobs:
8989
run: |
9090
helm push ./grove-charts-$PACKAGE_VERSION.tgz oci://$DOCKER_REGISTRY
9191
92+
- name: Push Go Module Tags
93+
if: startsWith(github.ref, 'refs/tags/')
94+
run: |
95+
echo "Creating and pushing Go module tags..."
96+
git config user.name "github-actions[bot]"
97+
git config user.email "github-actions[bot]@users.noreply.github.com"
98+
99+
# Validate git configuration
100+
echo "Git user configuration:"
101+
echo " user.name: $(git config user.name)"
102+
echo " user.email: $(git config user.email)"
103+
echo " Authenticated as: ${{ github.actor }}"
104+
105+
# Create tags for Go modules
106+
git tag operator/api/$PACKAGE_VERSION
107+
git tag operator/$PACKAGE_VERSION
108+
git tag scheduler/api/$PACKAGE_VERSION
109+
110+
# Push all module tags
111+
git push origin operator/api/$PACKAGE_VERSION operator/$PACKAGE_VERSION scheduler/api/$PACKAGE_VERSION
112+
113+
echo "✓ Go module tags pushed successfully"
114+
115+
- name: Validate Go Module Tags
116+
if: startsWith(github.ref, 'refs/tags/')
117+
run: |
118+
echo "Validating Go module tags were pushed successfully..."
119+
120+
# Verify operator/api tag
121+
if git ls-remote --tags origin operator/api/$PACKAGE_VERSION | grep -q "refs/tags/operator/api/$PACKAGE_VERSION"; then
122+
echo "✓ operator/api:$PACKAGE_VERSION validated successfully"
123+
else
124+
echo "✗ Failed to validate operator/api:$PACKAGE_VERSION"
125+
exit 1
126+
fi
127+
128+
# Verify operator tag
129+
if git ls-remote --tags origin operator/$PACKAGE_VERSION | grep -q "refs/tags/operator/$PACKAGE_VERSION"; then
130+
echo "✓ operator:$PACKAGE_VERSION validated successfully"
131+
else
132+
echo "✗ Failed to validate operator:$PACKAGE_VERSION"
133+
exit 1
134+
fi
135+
136+
# Verify scheduler/api tag
137+
if git ls-remote --tags origin scheduler/api/$PACKAGE_VERSION | grep -q "refs/tags/scheduler/api/$PACKAGE_VERSION"; then
138+
echo "✓ scheduler/api:$PACKAGE_VERSION validated successfully"
139+
else
140+
echo "✗ Failed to validate scheduler/api:$PACKAGE_VERSION"
141+
exit 1
142+
fi
143+
144+
echo "✓ All Go module tags validated successfully"
145+
92146
- name: Validate Docker Images
93147
run: |
94148
echo "Validating Docker images were pushed successfully..."
@@ -114,53 +168,4 @@ jobs:
114168
# Pull the chart to verify it's available
115169
helm pull oci://$DOCKER_REGISTRY/grove-charts --version $PACKAGE_VERSION
116170
117-
echo "✓ Helm chart grove-charts:$PACKAGE_VERSION validated successfully"
118-
119-
- name: Generate artifact checksums
120-
if: startsWith(github.ref, 'refs/tags/')
121-
run: |
122-
echo "Generating checksums for release artifacts..."
123-
sha256sum grove-charts-$PACKAGE_VERSION.tgz > grove-charts-$PACKAGE_VERSION.tgz.sha256
124-
echo "✓ Checksums generated"
125-
126-
- name: Create GitHub Release
127-
if: startsWith(github.ref, 'refs/tags/')
128-
uses: softprops/action-gh-release@v2
129-
with:
130-
name: Release ${{ github.ref_name }}
131-
draft: false
132-
prerelease: ${{ contains(github.ref_name, 'alpha') || contains(github.ref_name, 'beta') || contains(github.ref_name, 'rc') }}
133-
generate_release_notes: true
134-
body: |
135-
## Installation
136-
137-
### Using Helm (Recommended)
138-
139-
Install Grove using the published Helm chart:
140-
141-
```bash
142-
helm upgrade -i grove oci://${{ env.DOCKER_REGISTRY }}/grove-charts --version ${{ env.PACKAGE_VERSION }}
143-
```
144-
145-
### Using Docker Images
146-
147-
The following container images are available for this release:
148-
149-
- **Operator**: `${{ env.DOCKER_REGISTRY }}/grove-operator:${{ env.PACKAGE_VERSION }}`
150-
- **Init Container**: `${{ env.DOCKER_REGISTRY }}/grove-initc:${{ env.PACKAGE_VERSION }}`
151-
152-
## Artifacts
153-
154-
- **Helm Chart**: [grove-charts:${{ env.PACKAGE_VERSION }}](https://github.com/${{ github.repository }}/pkgs/container/grove%2Fgrove-charts)
155-
- **Docker Images**: [Packages](https://github.com/${{ github.repository }}/pkgs/container/grove-operator)
156-
157-
## Documentation
158-
159-
- [Installation Guide](https://github.com/${{ github.repository }}/blob/${{ github.ref_name }}/docs/installation.md)
160-
- [Quickstart Guide](https://github.com/${{ github.repository }}/blob/${{ github.ref_name }}/docs/quickstart.md)
161-
- [User Guide](https://github.com/${{ github.repository }}/tree/${{ github.ref_name }}/docs/user-guide)
162-
files: |
163-
grove-charts-${{ env.PACKAGE_VERSION }}.tgz
164-
grove-charts-${{ env.PACKAGE_VERSION }}.tgz.sha256
165-
env:
166-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
171+
echo "✓ Helm chart grove-charts:$PACKAGE_VERSION validated successfully"

0 commit comments

Comments
 (0)