ci: package and push the Helm chart to the OCI registry
Add a chart-push job that runs after the chart lint on every push and publishes the packaged chart to oci://gitea.tap-tap.win/taptap/charts. Main builds use <chart version>-sha.<commit> so parallel commits do not overwrite each other; v* tags use the tag version. The shared scripts/push-chart.sh also supports explicit VERSION and local use.
This commit is contained in:
1 parent
441fa056ba
commit
76bccaefea
4 files changed
+139
-2
No files matched your search
@@ -12,6 +12,7 @@ on:
|
||||
env:
|
||||
REGISTRY: gitea.tap-tap.win
|
||||
IMAGE_NAME: taptap/audiomanager
|
||||
CHART_REPO: taptap/charts
|
||||
# Built by scripts/build-ci-image.sh from ci/Dockerfile. Bump the tag when
|
||||
# ci/Dockerfile changes.
|
||||
CI_IMAGE: gitea.tap-tap.win/taptap/audiomanager-ci:2
|
||||
@@ -39,6 +40,27 @@ jobs:
|
||||
helm lint charts/musicmanager
|
||||
helm template musicmanager charts/musicmanager --set users.existingSecret=test > /dev/null
|
||||
|
||||
chart-push:
|
||||
needs:
|
||||
- chart
|
||||
if: github.event_name == 'push'
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: gitea.tap-tap.win/taptap/audiomanager-ci:2
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Log in to the registry
|
||||
run: |
|
||||
echo "${{ secrets.AUDIOMANAGER_REGISTRY_TOKEN }}" \
|
||||
| helm registry login "$REGISTRY" \
|
||||
--username "${{ gitea.actor }}" \
|
||||
--password-stdin
|
||||
- name: Package and push the chart
|
||||
run: scripts/push-chart.sh
|
||||
|
||||
image:
|
||||
needs:
|
||||
- test
|
||||
|
||||
Reference in new issue
Block a user