Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 43 additions & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,11 @@ jobs:
tags: |
${{ secrets.DOCKER_REGISTRY }}/${{ secrets.DOCKER_USERNAME }}/${{ secrets.DOCKER_REPOSITORY }}:${{ needs.versioning.outputs.MajorMinorPatch }}
${{ secrets.DOCKER_REGISTRY }}/${{ secrets.DOCKER_USERNAME }}/${{ secrets.DOCKER_REPOSITORY }}:latest
build-helm:

build-helm-oci:
name: Helm Building
runs-on: ubuntu-latest
needs: [versioning, test]
needs: [build-docker]
if: github.ref_name == 'main' || github.event_name == 'release'
steps:
- uses: actions/checkout@v4
Expand All @@ -73,3 +74,43 @@ jobs:
helm registry login ${{ secrets.DOCKER_REGISTRY }} --username ${{ secrets.DOCKER_USERNAME }} --password ${{ secrets.DOCKER_PASSWORD }}
helm push swagger-operator-${{ needs.versioning.outputs.MajorMinorPatch }}-chart.tgz oci://${{ secrets.DOCKER_REGISTRY }}/${{ secrets.DOCKER_USERNAME }}

build-helm:
name: Helm Build & Publish to GitHub Pages
runs-on: ubuntu-latest
needs: [versioning, test]
if: github.ref_name == 'main' || github.event_name == 'release'
steps:
- uses: actions/checkout@v4

- name: Set up Helm
uses: azure/setup-helm@v4

- name: Package Helm chart
run: |
helm package ./charts/swagger-operator \
--app-version ${{ needs.versioning.outputs.MajorMinorPatch }} \
--version ${{ needs.versioning.outputs.MajorMinorPatch }}-chart
mkdir -p helm-charts
mv swagger-operator-*.tgz helm-charts/

- name: Checkout gh-pages branch
uses: actions/checkout@v4
with:
ref: gh-pages
path: gh-pages

- name: Copy new chart to gh-pages
run: |
cp helm-charts/*.tgz gh-pages/
cd gh-pages
helm repo index . --url https://ziul.github.io/swagger-operator/

- name: Commit and push changes
run: |
cd gh-pages
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add .
git commit -m "Update Helm chart [skip ci]" || echo "No changes to commit"
git push origin gh-pages