mirror of
https://github.com/bjw-s-labs/helm-charts.git
synced 2025-07-04 08:57:04 +02:00
feat(common): Release version 1.3.2 (#120)
* fix(common): Increase CronJob pod annotations indent from 10 to 12 (#118) * feat(common): Add tests for CronJob jobTemplate metadata * feat(common): Update netshoot image * feat(common): Update code-server image * feat(ci): add workflow to create oci artifact (#38) * ci: Update release workflows --------- Signed-off-by: Tyler Witlin <tyler@codezero.io> Co-authored-by: Gabe Cook <gabe565@gmail.com> Co-authored-by: Tyler Witlin <45468117+coolguy1771@users.noreply.github.com>
This commit is contained in:
parent
75048c6d73
commit
93e761fd99
19 changed files with 151 additions and 43 deletions
70
.github/workflows/charts-release-oci.yaml
vendored
Normal file
70
.github/workflows/charts-release-oci.yaml
vendored
Normal file
|
@ -0,0 +1,70 @@
|
|||
name: "Charts: Release to GHCR OCI"
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
charts:
|
||||
description: >
|
||||
Json encoded list of Helm charts to release.
|
||||
Defaults to releasing everything.
|
||||
default: "[]"
|
||||
required: false
|
||||
type: string
|
||||
secrets:
|
||||
BJWS_APP_ID:
|
||||
required: true
|
||||
BJWS_APP_PRIVATE_KEY:
|
||||
required: true
|
||||
|
||||
env:
|
||||
HELM_VERSION: 3.11.1
|
||||
|
||||
jobs:
|
||||
release-charts:
|
||||
name: Release charts
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Get GitHub API token
|
||||
id: get-app-token
|
||||
uses: getsentry/action-github-app-token@v1
|
||||
with:
|
||||
app_id: ${{ secrets.BJWS_APP_ID }}
|
||||
private_key: ${{ secrets.BJWS_APP_PRIVATE_KEY }}
|
||||
|
||||
- name: Login to GitHub Container Registry
|
||||
id: login-to-ghcr
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.BJWS_APP_PRIVATE_KEY }}
|
||||
|
||||
- name: Checkout charts branch
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
token: ${{ steps.get-app-token.outputs.token }}
|
||||
path: "src"
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Install Kubernetes tools
|
||||
uses: yokawasa/action-setup-kube-tools@v0.8.2
|
||||
with:
|
||||
setup-tools: |
|
||||
helmv3
|
||||
helm: "${{ env.HELM_VERSION }}"
|
||||
|
||||
- name: Package & Push Helm Charts
|
||||
shell: bash
|
||||
env:
|
||||
SRC_DIR: "src/charts"
|
||||
run: |
|
||||
CHARTS=( $(yq --null-input e '${{ inputs.charts }}[]' ) )
|
||||
|
||||
for CHART in "${CHARTS[@]}" ; do
|
||||
mapfile -t CHART_PATH_PARTS < <(echo "$CHART" | tr '/' '\n')
|
||||
CHART_TYPE=${CHART_PATH_PARTS[0]}
|
||||
|
||||
helm dep up "${SRC_DIR}/${CHART}"
|
||||
helm package "${SRC_DIR}/${CHART}" -u
|
||||
helm push ${CHART} oci://ghcr.io/${{ github.actor }}
|
||||
done
|
Loading…
Add table
Add a link
Reference in a new issue