Skip to content

django: update cluster backup section #15

django: update cluster backup section

django: update cluster backup section #15

Workflow file for this run

name: Release Charts
on:
push:
branches:
- main
jobs:
release:
# depending on default permission settings for your org (contents being read-only or read-write for workloads), you will have to add permissions
# see: https://docs.github.com/en/actions/security-guides/automatic-token-authentication#modifying-the-permissions-for-the-github_token
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
- name: Install Helm
uses: azure/setup-helm@v4
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
- name: Cache jsonnet deps
id: cache-primes
uses: actions/cache@v4
with:
path: ./jsonnet/vendor
key: ${{ runner.os }}-jsonnet
- name: Install jsonnet
uses: kobtea/setup-jsonnet-action@v2
- name: Compile jsonnet mixins
run: |
export PATH=${PATH}:`go env GOPATH`/bin
go install github.com/brancz/gojsontoyaml@latest
cd jsonnet
jb install
make
- name: Add dependency repositories
run: |
for dir in $(ls -d charts/*/); do
helm dependency list $dir 2> /dev/null | tail +2 | head -n -1 | awk '{ print "helm repo add " $1 " " $3 }' | while read cmd; do $cmd; done
done
- name: Run chart-releaser
uses: helm/chart-releaser-action@main
id: chart_releaser
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
with:
charts_dir: charts/
pages_branch: gh-pages
# skip_upload: true
- name: Log in to Harbor
if: steps.chart_releaser.outputs.changed_charts
run: |
helm registry login ${{ vars.DOCKER_REGISTRY }} -u '${{ secrets.DOCKER_USERNAME }}' -p '${{ secrets.DOCKER_PASSWORD }}'
- name: Upload charts
if: steps.chart_releaser.outputs.changed_charts
run: |
for chart in .cr-release-packages/*.tgz ; do
oci_url=oci://${{ vars.DOCKER_REGISTRY }}/$(echo ${{ vars.DOCKER_IMAGE_REPO }} | cut -d / -f 1) ;
echo Pushing "$chart" to "$oci_url" ;
helm push "$chart" "$oci_url" ;
done