Skip to content

Commit

Permalink
DO-2725 Release helm charts with github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
jantomgid authored and ctomc committed Mar 26, 2024
1 parent fc52089 commit ebcd889
Show file tree
Hide file tree
Showing 3 changed files with 95 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/.github/workflows/_* @globalid/infra-core @globalid/devops
63 changes: 63 additions & 0 deletions .github/workflows/release.yml
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 }}
31 changes: 31 additions & 0 deletions .github/workflows/test.yml
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 }}

0 comments on commit ebcd889

Please sign in to comment.