Skip to content

Commit

Permalink
ci(actions): Add oci push action
Browse files Browse the repository at this point in the history
  • Loading branch information
a5r0n committed Dec 9, 2023
1 parent ab98b23 commit 2686884
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/push-chart.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Push Helm chart to OCI

on:
push:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
id: checkout
- uses: azure/setup-helm@v3
id: install_helm
- name: Build Helm chart
run: |
helm package ./n8n
- name: Login to Helm OCI
run: |
echo ${{ secrets.GITHUB_TOKEN }} | helm registry login ${{ vars.OCI_REGISTRY }} --username ${{ github.repository_owner }} --password-stdin
- name: Push Helm chart to OCI
run: |
helm push n8n-*.tgz oci://${{ vars.OCI_REGISTRY }}/${{ vars.OCI_REPOSITORY }}
- name: Update README.md with Helm chart version
run: |
sed -i "s/--version .*/--version: $(grep -oP '^version: \K.*' n8n/Chart.yaml)/" README.md
- name: Commit and push changes
run: |
git config --global user.name "${{ github.actor }}"
git config --global user.email "${{ github.actor }}@users.noreply.github.com"
git add README.md
git commit -m "relase: Update Helm chart version to $(grep -oP '^version: \K.*' n8n/Chart.yaml)"
git push

0 comments on commit 2686884

Please sign in to comment.