-
Notifications
You must be signed in to change notification settings - Fork 34
80 lines (77 loc) · 2.42 KB
/
release.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
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