Skip to content

Commit

Permalink
feat: release charts from GH repo (#3095)
Browse files Browse the repository at this point in the history
  • Loading branch information
stuartwdouglas authored Oct 13, 2024
1 parent 86381ac commit f4fbc42
Show file tree
Hide file tree
Showing 15 changed files with 38 additions and 21 deletions.
39 changes: 32 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,6 @@ jobs:
with:
username: ftl0
password: ${{ secrets.FTL_DOCKER_PUSH_TOKEN }}
- name: Push Helm Chart
run: |
helm registry login -u ftl0 -p "$PASSWORD" registry-1.docker.io
version="$(git describe --tags --abbrev=0 | sed 's/v//')"
just chart release oci://registry-1.docker.io/ftl0 "$version"
env:
PASSWORD: ${{ secrets.FTL_DOCKER_PUSH_TOKEN }}
- name: Push Docker Images
run: |
version="$(git describe --tags --abbrev=0)"
Expand Down Expand Up @@ -225,3 +218,35 @@ jobs:
just publish-extension
env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}
helm-release:
name: Release Helm Charts
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
name: "Checkout Charts Repository"
with:
repository: 'stuartwdouglas/ftl-charts'
token: '${{ secrets.FTL_CHARTS_TOKEN }}'
fetch-depth: 0
- name: Checkout FTL
uses: actions/checkout@v4
with:
fetch-depth: 0
path: .ftl
- name: Init Hermit
uses: cashapp/[email protected]
with:
working-directory: '.ftl'
- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
git config pull.rebase true
- name: Sync Charts to Charts Repository
run: |
version="$(git describe --tags --abbrev=0 | sed 's/v//')"
( cd .ftl && just chart set-version "$version" )
cp -r .ftl/charts/ charts/
git add charts
git commit -a -m "Update charts"
git push
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,5 @@ junit*.xml
.ftl.lock
docker-build/
**/.ftl
charts/charts/
charts/output/
charts/**/charts/
charts/**/output/
16 changes: 4 additions & 12 deletions charts/Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,12 @@ _help:
@just -l

dep-update:
helm dep update .
helm dep update ftl

set-version version:
@echo "Setting version to {{version}}"
yq -i '.version="{{version}}",.appVersion="{{version}}"' Chart.yaml
yq -i '.version="{{version}}",.appVersion="{{version}}"' ftl/Chart.yaml

package:
helm lint .
helm package -u . -d output

publish repo version:
helm push output/ftl-chart-{{version}}.tgz {{repo}}

release repo version:
just set-version {{version}}
just package
just publish {{repo}} {{version}}
helm lint ftl
helm package -u ftl -d output
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit f4fbc42

Please sign in to comment.