-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DO-2725 Release helm charts with github actions
- Loading branch information
Showing
3 changed files
with
95 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/.github/workflows/_* @globalid/infra-core @globalid/devops |
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 |
---|---|---|
@@ -0,0 +1,63 @@ | ||
name: Release Helm Packages | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'iris-manager-v*' | ||
- 'iris-router-v*' | ||
- 'iris-subscription-v*' | ||
jobs: | ||
wait: | ||
runs-on: ubuntu-latest | ||
name: Wait for tests | ||
steps: | ||
- name: Wait for tests to succeed | ||
uses: lewagon/[email protected] | ||
with: | ||
ref: "${{ github.sha }}" | ||
running-workflow-name: 'test' | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
check-regexp: run-tests.* | ||
release: | ||
needs: [ wait ] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
path: 'src' | ||
fetch-depth: 0 | ||
|
||
- name: Get folder and version | ||
uses: winterjung/split@v2 | ||
id: split | ||
with: | ||
msg: ${{ github.ref }} | ||
separator: '-v' | ||
|
||
- name: Install Helm | ||
uses: azure/setup-helm@v3 | ||
|
||
- name: Package Helm Charts | ||
shell: bash | ||
run: | | ||
find src/${FOLDER}/ -type f -name 'Chart.yaml' | sed -r 's|/[^/]+$||' | sort | uniq | xargs -L 1 helm dep up | ||
echo "src/${FOLDER}/" | ||
helm package "src/${FOLDER}/" -u -d dest --version ${VERSION} | ||
env: | ||
FOLDER: ${{ steps.split.outputs._1 }} | ||
VERSION: v${{ steps.split.outputs._2 }} | ||
|
||
- name: Chart | Push | ||
uses: appany/[email protected] | ||
with: | ||
name: ${FOLDER} | ||
repository: iris-events/iris-charts | ||
path: src/${FOLDER} | ||
tag: ${VERSION} | ||
registry: ghcr.io | ||
registry_username: ${{ github.actor }} | ||
registry_password: ${{ secrets.GITHUB_TOKEN }} | ||
env: | ||
FOLDER: ${{ steps.split.outputs._1 }} | ||
VERSION: v${{ steps.split.outputs._2 }} |
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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Build and test Helm packages | ||
on: | ||
push: | ||
branches: | ||
- "**" | ||
pull_request_target: | ||
types: | ||
- ready_for_review | ||
branches: | ||
- main | ||
workflow_dispatch: null | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
name: run-tests | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
package: [ | ||
iris-manager, | ||
iris-router, | ||
iris-subscription | ||
] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Helm Lint ${{ matrix.package }} | ||
run: helm lint ${{ matrix.package }} | ||
- name: Helm Package ${{ matrix.package }} | ||
run: helm package ${{ matrix.package }} |