-
Notifications
You must be signed in to change notification settings - Fork 13
47 lines (40 loc) · 1016 Bytes
/
build-main.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
name: Build and push :main image
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Log in to GHCR
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build Image
env:
REGISTRY: ghcr.io/${{ github.repository_owner }}
run: |
echo 'db-controller-namespace' > .id
make docker-build
make docker-build-dbproxy
- name: Push to GHCR
env:
REGISTRY: ghcr.io/${{ github.repository_owner }}
run: |
make docker-push
make docker-push-dbproxy
- uses: act10ns/slack@v1
with:
status: ${{ job.status }}
steps: ${{ toJson(steps) }}
channel: '#db-controller'
if: failure()