-
Notifications
You must be signed in to change notification settings - Fork 691
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve release process automating several actions: - After the container is published, an automatic PR will be created updating the chart - After the chart is published, an automatic PR will be created updating the Carvel package Signed-off-by: Alejandro Moreno <[email protected]>
- Loading branch information
Showing
3 changed files
with
53 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,9 +2,14 @@ name: Publish Release | |
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
chart: | ||
description: 'Chart version (e.g. 2.11.3)' | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
build: | ||
release: | ||
runs-on: ubuntu-latest | ||
env: | ||
controller_dockerhub_image_name: docker.io/bitnami/sealed-secrets-controller | ||
|
@@ -153,3 +158,38 @@ jobs: | |
COSIGN_PASSWORD: ${{ secrets.COSIGN_PASSWORD }} | ||
TAG_CURRENT: ${{ steps.meta_kubeseal.outputs.tags }} | ||
COSIGN_REPOSITORY: ${{ env.kubeseal_ghcr_image_name }}/signs | ||
|
||
chart-pr: | ||
needs: release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Config Git | ||
run: | | ||
git config user.name "$GITHUB_ACTOR" | ||
git config user.email "[email protected]" | ||
- name: Fetch Versions | ||
run: | | ||
echo NEW_VERSION=$(git describe --tags --match "v[0-9]*" --abbrev=0 | tr -d v) >> "$GITHUB_ENV" | ||
echo PREV_VERSION=$(grep appVersion helm/sealed-secrets/Chart.yaml | grep -o '[0-9.]*') >> "$GITHUB_ENV" | ||
- name: Update Version | ||
run: | | ||
sed -i "s/version: .*/version: ${{ inputs.chart }}/" helm/sealed-secrets/Chart.yaml | ||
sed -i "s/appVersion: .*/appVersion: $NEW_VERSION/" helm/sealed-secrets/Chart.yaml | ||
sed -i "s/tag: .*/tag: $NEW_VERSION/" helm/sealed-secrets/values.yaml | ||
sed -i "s/\`$PREV_VERSION\`/\`$NEW_VERSION\`/" helm/sealed-secrets/README.md | ||
git checkout -B 'release-chart-${{ inputs.chart }}' | ||
git add helm/sealed-secrets/Chart.yaml helm/sealed-secrets/values.yaml helm/sealed-secrets/README.md | ||
git commit -m 'Release chart ${{ inputs.chart }}' | ||
git push origin 'release-chart-${{ inputs.chart }}' | ||
- name: Create PR | ||
run: gh pr create --fill --base main --repo $GITHUB_REPOSITORY | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Release | ||
name: Prepare Release | ||
|
||
# Only release when a new GH release branch is pushed | ||
on: | ||
|