mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
upload helm chart to cloudsmith
This commit is contained in:
25
.github/workflows/helm-chart-release.yaml
vendored
25
.github/workflows/helm-chart-release.yaml
vendored
@@ -1,33 +1,26 @@
|
|||||||
name: Release Charts
|
name: Release Helm Charts
|
||||||
|
|
||||||
on: [workflow_dispatch]
|
on: [workflow_dispatch]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
release:
|
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
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
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
|
- name: Install Helm
|
||||||
uses: azure/setup-helm@v3
|
uses: azure/setup-helm@v3
|
||||||
with:
|
with:
|
||||||
version: v3.10.0
|
version: v3.10.0
|
||||||
|
- name: Build helm package
|
||||||
- name: Run chart-releaser
|
run: cd helm-charts && helm package ./infisical
|
||||||
uses: helm/chart-releaser-action@v1.4.1
|
uses: helm/chart-releaser-action@v1.4.1
|
||||||
with:
|
- name: Install python and Cloudsmith CLI
|
||||||
charts_dir: helm-charts
|
uses: actions/setup-python@v4
|
||||||
|
run: pip install --upgrade cloudsmith-cli
|
||||||
|
- name: Push helm package to Cloudsmith
|
||||||
|
run: cd helm-charts && sh upload-to-cloudsmith.sh
|
||||||
env:
|
env:
|
||||||
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
|
CLOUDSMITH_API_KEY: ${{ secrets.CLOUDSMITH_API_KEY }}
|
||||||
10
helm-charts/upload-to-cloudsmith.sh
Normal file
10
helm-charts/upload-to-cloudsmith.sh
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
## Loop through each helm chart directoy and build each into helm package
|
||||||
|
for d in */ ; do
|
||||||
|
helm package $d
|
||||||
|
done
|
||||||
|
|
||||||
|
## Upload each packaged helm chart
|
||||||
|
for i in *.tgz; do
|
||||||
|
[ -f "$i" ] || break
|
||||||
|
cloudsmith push helm --republish infisical/helm-charts $i
|
||||||
|
done
|
||||||
Reference in New Issue
Block a user