Skip to content

Merge pull request #46 from flanksource/canary-check-job-fix #57

Merge pull request #46 from flanksource/canary-check-job-fix

Merge pull request #46 from flanksource/canary-check-job-fix #57

Workflow file for this run

name: Create Release
on:
push:
branches:
- main
jobs:
semantic-release:
runs-on: ubuntu-latest
outputs:
release-version: ${{ steps.semantic.outputs.new_release_version }}
new-release-published: ${{ steps.semantic.outputs.new_release_published }}
steps:
- uses: actions/checkout@v2
- uses: cycjimmy/semantic-release-action@v3
id: semantic
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
helm:
runs-on: ubuntu-latest
needs: semantic-release
steps:
- uses: actions/checkout@v3
- name: Download yq
run: |
wget -nv -nc -O yq https://github.com/mikefarah/yq/releases/download/v4.20.2/yq_linux_amd64
chmod +x yq
- name: Set version
run: |
if ${{ needs.semantic-release.outputs.new-release-published }}; then
echo "RELEASE_VERSION=${{ needs.semantic-release.outputs.release-version }}" >> $GITHUB_ENV
else
git fetch --prune --unshallow
export VERSION=$(git describe --abbrev=0 --tags | sed -e 's/^v//')
echo "RELEASE_VERSION=$VERSION" >> $GITHUB_ENV
fi
- name: Update chart version
run: ./yq -i e '.version = "${{ env.RELEASE_VERSION }}"' chart/Chart.yaml
- name: Update app version
run: ./yq -i e '.appVersion = "${{ env.RELEASE_VERSION }}"' chart/Chart.yaml
- name: Set up Helm
uses: azure/setup-helm@v1
with:
version: v3.8.0
- name: Package Helm chart
run: |
make chart
- name: Clone charts repo
uses: actions/checkout@v3
with:
repository: "${{ github.repository_owner }}/charts"
path: charts
token: "${{ secrets.FLANKBOT }}"
- name: Update chart repo
run: |
cd charts
cp ../mission-control-tenant-*.tgz ./
helm repo index --merge index.yaml .
- name: Push changes to chart repo
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "Release ${{ needs.semantic-release.outputs.release-version }} of ${{ github.repository }}"
branch: gh-pages
repository: ./charts