Release Kratix #9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release Kratix | |
on: | |
workflow_run: | |
workflows: [Test Kratix] | |
types: [completed] | |
branches: [main] | |
jobs: | |
tag-new-version: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out kratix | |
uses: actions/checkout@v4 | |
- name: Tag new version | |
run: | | |
./scripts/tag-latest-version | |
build-and-push-kratix-platform: | |
runs-on: ubuntu-latest | |
needs: [tag-new-version] | |
steps: | |
- name: Check out kratix | |
uses: actions/checkout@v4 | |
- name: Docker login to GHCR | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Build and push Kratix Platform | |
run: | | |
make docker-build-and-push | |
build-and-push-pipeline-adapter: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out kratix | |
uses: actions/checkout@v4 | |
- name: Docker login to GHCR | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Build and push Pipeline | |
run: | | |
make build-and-push-work-creator | |
publish-release: | |
runs-on: ubuntu-latest | |
needs: | |
- build-and-push-kratix-platform | |
- build-and-push-pipeline-adapter | |
steps: | |
- name: Check out kratix | |
uses: actions/checkout@v4 | |
id: checkout | |
- name: Checkout out kratix helm charts | |
uses: actions/checkout@v4 | |
with: | |
repository: syntasso/helm-charts | |
path: charts | |
ssh-key: ${{ secrets.HELM_REPO_SSH_KEY }} | |
- name: Create Kratix Distribution and Helm Template | |
run: | | |
./scripts/make-distribution | |
./charts/scripts/generate-templates-and-crds ./distribution/kratix.yaml | |
env: | |
VERSION: ${{ steps.checkout.outputs.commit }} | |
- name: Create Github Release | |
run: | | |
gh config set prompt disabled | |
gh release delete <<pipeline.git.tag>> || true | |
gh release create <<pipeline.git.tag>> --title <<pipeline.git.tag>> ./distribution/**/*.yaml ./distribution/*.yaml | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: push-to-helm-charts | |
run: | | |
cd charts | |
git add kratix/ | |
git diff --cached --quiet && exit 0 || true | |
git commit -m"update kratix package" | |
git push origin main |