-
-
Notifications
You must be signed in to change notification settings - Fork 8
57 lines (49 loc) · 1.43 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
55
56
57
name: Build and deploy (staging)
on:
push:
branches:
- master
env:
RELEASE_NAME: doctors-website
CHART_VALUES_FILE: .helm/values.stage.yml
DEPLOY_NAMESPACE: doctors-stage
DEPLOY_ENV: staging
DEPLOY_URL: https://stage-zdravniki.sledilnik.org
jobs:
build:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'NOBUILD')"
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: .
file: ./Dockerfile
tags: |
ghcr.io/${{ github.repository_owner }}/doctors-website:latest
build-args: |
BUILD_MODE=staging
deploy:
runs-on: ubuntu-latest
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@v1.0.2
with:
chartName: sledilnik/website
chartVersion: '1.0.0'
kubeconfig: '${{ secrets.KUBECONFIG }}'