-
-
Notifications
You must be signed in to change notification settings - Fork 4
54 lines (46 loc) · 1.35 KB
/
stage.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
52
53
54
name: Build and deploy (stagging)
on:
push:
branches:
- master
env:
RELEASE_NAME: data-api
CHART_VALUES_FILE: .helm/values.stage.yml
DEPLOY_NAMESPACE: sledilnik-stage
DEPLOY_ENV: stagging
DEPLOY_URL: https://api-stage.sledilnik.org
jobs:
build:
runs-on: ubuntu-20.04
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to ghcr.io
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GHCR_TOKEN }}
- name: Build and push docker container image
uses: docker/build-push-action@v6
with:
push: true
context: ./sources/SloCovidServer
file: ./sources/SloCovidServer/Dockerfile
tags: |
ghcr.io/${{ github.repository_owner }}/data-api:latest
deploy:
runs-on: ubuntu-20.04
needs: build
if: "!contains(github.event.head_commit.message, 'NODEPLOY')"
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Deploy
uses: sledilnik/action-helm-deploy@master
with:
chartName: sledilnik/data-api
chartVersion: '1.0.2'
kubeconfig: '${{ secrets.KUBECONFIG }}'