-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (47 loc) · 1.69 KB
/
build_publish.yml
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
name: Build and deploy
on:
push:
branches:
- main
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: update tag in manifest.yml
run: sed -i -e "s#__TAG__#${GITHUB_SHA}#g" values.yaml
- uses: WyriHaximus/github-action-helm3@v2
with:
exec: helm lint
kubeconfig: ${{ secrets.KUBECONFIG_RAW }}
- uses: WyriHaximus/github-action-helm3@v2
with:
exec: helm lint --strict
kubeconfig: ${{ secrets.KUBECONFIG_RAW }}
build_push_docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build the tagged Docker image
run: docker build -t ghcr.io/woog-life/graphing:${GITHUB_SHA} .
- name: Push the tagged Docker image
run: docker push ghcr.io/woog-life/graphing:${GITHUB_SHA}
deploy:
runs-on: ubuntu-latest
needs: build_push_docker
steps:
- uses: actions/checkout@v4
- name: update tag in manifest.yml
run: sed -i -e "s#__TAG__#${GITHUB_SHA}#g" values.yaml
- run: sed -i -e "s/__ACCESS_KEY_ID__/${{ secrets.EXOSCALE_WOOGLIFE_PUTOBJECT_ACCESS_KEY }}/g" values.yaml
- run: sed -i -e "s/__SECRET_ACCESS_KEY__/${{ secrets.EXOSCALE_WOOGLIFE_PUTOBJECT_ACCESS_SECRET }}/g" values.yaml
- uses: WyriHaximus/github-action-helm3@v2
with:
exec: helm upgrade graphing . --install --namespace=wooglife --atomic
kubeconfig: ${{ secrets.KUBECONFIG_RAW }}