Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| da45415cfe | |||
| 897555b1dc | |||
| df1f4d9b50 |
@@ -62,3 +62,80 @@ jobs:
|
|||||||
cache-from: type=gha
|
cache-from: type=gha
|
||||||
cache-to: type=gha,mode=max
|
cache-to: type=gha,mode=max
|
||||||
platforms: linux/amd64
|
platforms: linux/amd64
|
||||||
|
|
||||||
|
release:
|
||||||
|
if: startsWith(github.ref, 'refs/tags/v')
|
||||||
|
needs: build-and-push
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
packages: write
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v6
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Set up Helm
|
||||||
|
uses: azure/setup-helm@v4
|
||||||
|
|
||||||
|
- name: Extract version from tag
|
||||||
|
id: version
|
||||||
|
run: |
|
||||||
|
TAG=${GITHUB_REF#refs/tags/}
|
||||||
|
VERSION=${TAG#v}
|
||||||
|
echo "tag=${TAG}" >> $GITHUB_OUTPUT
|
||||||
|
echo "version=${VERSION}" >> $GITHUB_OUTPUT
|
||||||
|
echo "🚀 Creating release for ${TAG}"
|
||||||
|
|
||||||
|
- name: Package and Push Helm Chart
|
||||||
|
run: |
|
||||||
|
helm registry login ghcr.io \
|
||||||
|
--username ${{ github.actor }} \
|
||||||
|
--password ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
helm package chart/
|
||||||
|
helm push devcontainer-${{ steps.version.outputs.version }}.tgz oci://ghcr.io/cpfarhood/charts
|
||||||
|
|
||||||
|
- name: Generate Release Notes
|
||||||
|
id: notes
|
||||||
|
run: |
|
||||||
|
# Get commits since last tag
|
||||||
|
PREV_TAG=$(git describe --tags --abbrev=0 ${{ steps.version.outputs.tag }}^ 2>/dev/null || echo "")
|
||||||
|
if [ -z "$PREV_TAG" ]; then
|
||||||
|
COMMITS=$(git log --pretty=format:"- %s (%h)" ${{ steps.version.outputs.tag }})
|
||||||
|
else
|
||||||
|
COMMITS=$(git log --pretty=format:"- %s (%h)" ${PREV_TAG}..${{ steps.version.outputs.tag }})
|
||||||
|
fi
|
||||||
|
|
||||||
|
cat << EOF > release-notes.md
|
||||||
|
## 🚀 Release ${{ steps.version.outputs.version }}
|
||||||
|
|
||||||
|
### Changes
|
||||||
|
${COMMITS}
|
||||||
|
|
||||||
|
### Docker Image
|
||||||
|
\`\`\`bash
|
||||||
|
docker pull ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.version.outputs.tag }}
|
||||||
|
\`\`\`
|
||||||
|
|
||||||
|
### Helm Chart
|
||||||
|
\`\`\`bash
|
||||||
|
helm install devcontainer oci://ghcr.io/cpfarhood/charts/devcontainer --version ${{ steps.version.outputs.version }}
|
||||||
|
\`\`\`
|
||||||
|
EOF
|
||||||
|
|
||||||
|
echo "notes<<EOF" >> $GITHUB_OUTPUT
|
||||||
|
cat release-notes.md >> $GITHUB_OUTPUT
|
||||||
|
echo "EOF" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Create GitHub Release
|
||||||
|
uses: actions/create-release@v1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
tag_name: ${{ steps.version.outputs.tag }}
|
||||||
|
release_name: Release ${{ steps.version.outputs.tag }}
|
||||||
|
body: ${{ steps.notes.outputs.notes }}
|
||||||
|
draft: false
|
||||||
|
prerelease: false
|
||||||
|
|||||||
@@ -1,86 +0,0 @@
|
|||||||
name: Release
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
tags:
|
|
||||||
- 'v*'
|
|
||||||
|
|
||||||
env:
|
|
||||||
REGISTRY: ghcr.io
|
|
||||||
IMAGE_NAME: ${{ github.repository }}
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
release:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
packages: write
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v6
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Set up Helm
|
|
||||||
uses: azure/setup-helm@v4
|
|
||||||
|
|
||||||
- name: Extract version from tag
|
|
||||||
id: version
|
|
||||||
run: |
|
|
||||||
TAG=${GITHUB_REF#refs/tags/}
|
|
||||||
VERSION=${TAG#v}
|
|
||||||
echo "tag=${TAG}" >> $GITHUB_OUTPUT
|
|
||||||
echo "version=${VERSION}" >> $GITHUB_OUTPUT
|
|
||||||
echo "🚀 Creating release for ${TAG}"
|
|
||||||
|
|
||||||
- name: Package and Push Helm Chart
|
|
||||||
run: |
|
|
||||||
helm registry login ghcr.io \
|
|
||||||
--username ${{ github.actor }} \
|
|
||||||
--password ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
helm package chart/
|
|
||||||
helm push devcontainer-${{ steps.version.outputs.version }}.tgz oci://ghcr.io/cpfarhood/charts
|
|
||||||
|
|
||||||
- name: Generate Release Notes
|
|
||||||
id: notes
|
|
||||||
run: |
|
|
||||||
# Get commits since last tag
|
|
||||||
PREV_TAG=$(git describe --tags --abbrev=0 ${{ steps.version.outputs.tag }}^ 2>/dev/null || echo "")
|
|
||||||
if [ -z "$PREV_TAG" ]; then
|
|
||||||
COMMITS=$(git log --pretty=format:"- %s (%h)" ${{ steps.version.outputs.tag }})
|
|
||||||
else
|
|
||||||
COMMITS=$(git log --pretty=format:"- %s (%h)" ${PREV_TAG}..${{ steps.version.outputs.tag }})
|
|
||||||
fi
|
|
||||||
|
|
||||||
cat << EOF > release-notes.md
|
|
||||||
## 🚀 Release ${{ steps.version.outputs.version }}
|
|
||||||
|
|
||||||
### Changes
|
|
||||||
${COMMITS}
|
|
||||||
|
|
||||||
### Docker Image
|
|
||||||
\`\`\`bash
|
|
||||||
docker pull ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.version.outputs.tag }}
|
|
||||||
\`\`\`
|
|
||||||
|
|
||||||
### Helm Chart
|
|
||||||
\`\`\`bash
|
|
||||||
helm install devcontainer oci://ghcr.io/cpfarhood/charts/devcontainer --version ${{ steps.version.outputs.version }}
|
|
||||||
\`\`\`
|
|
||||||
EOF
|
|
||||||
|
|
||||||
echo "notes<<EOF" >> $GITHUB_OUTPUT
|
|
||||||
cat release-notes.md >> $GITHUB_OUTPUT
|
|
||||||
echo "EOF" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
- name: Create GitHub Release
|
|
||||||
uses: actions/create-release@v1
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
with:
|
|
||||||
tag_name: ${{ steps.version.outputs.tag }}
|
|
||||||
release_name: Release ${{ steps.version.outputs.tag }}
|
|
||||||
body: ${{ steps.notes.outputs.notes }}
|
|
||||||
draft: false
|
|
||||||
prerelease: false
|
|
||||||
@@ -174,8 +174,7 @@ helm install my-devcontainer ./chart -f custom-values.yaml
|
|||||||
|
|
||||||
### CI/CD
|
### CI/CD
|
||||||
|
|
||||||
- **`build-and-push.yaml`** — Builds and pushes to GHCR on every push to `main`, version tags (`v*`), and PRs. Tags: `latest` (main), semver, branch name, commit SHA.
|
- **`build-and-push.yaml`** — Builds and pushes to GHCR on every push to `main`, version tags (`v*`), and PRs. For version tags, also creates GitHub Release with Helm chart after Docker build completes. Tags: `latest` (main), semver, branch name, commit SHA.
|
||||||
- **`release.yaml`** — Creates a GitHub Release with docker pull instructions when a version tag is pushed.
|
|
||||||
- **`dependabot.yml`** — Weekly updates for GitHub Actions and Docker base image.
|
- **`dependabot.yml`** — Weekly updates for GitHub Actions and Docker base image.
|
||||||
|
|
||||||
Image registry: `ghcr.io/cpfarhood/devcontainer`
|
Image registry: `ghcr.io/cpfarhood/devcontainer`
|
||||||
|
|||||||
+1
-1
@@ -2,5 +2,5 @@ apiVersion: v2
|
|||||||
name: devcontainer
|
name: devcontainer
|
||||||
description: Dev Container with AI coding agents and MCP sidecars
|
description: Dev Container with AI coding agents and MCP sidecars
|
||||||
type: application
|
type: application
|
||||||
version: 0.4.1
|
version: 0.4.3
|
||||||
appVersion: "latest"
|
appVersion: "latest"
|
||||||
|
|||||||
@@ -245,6 +245,8 @@ spec:
|
|||||||
- --browser
|
- --browser
|
||||||
- chromium
|
- chromium
|
||||||
- --no-sandbox
|
- --no-sandbox
|
||||||
|
- --host
|
||||||
|
- 0.0.0.0
|
||||||
- --port
|
- --port
|
||||||
- {{ .Values.mcp.sidecars.playwright.port | quote }}
|
- {{ .Values.mcp.sidecars.playwright.port | quote }}
|
||||||
ports:
|
ports:
|
||||||
|
|||||||
Reference in New Issue
Block a user