-
-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (37 loc) · 1.41 KB
/
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
name: Build and Push Backend Docker Container to GitHub Container Registry
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
# Checkout the repository
- name: Checkout code
uses: actions/checkout@v3
# Log in to GitHub Container Registry (GHCR)
- name: Log in to GitHub Container Registry
uses: docker/login-action@v2
with:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: ghcr.io
# Build and push keyfade-backend container - hard coded name due to repo capitalisation
- name: Build and Push keyfade-backend container
run: |
cd keyfade-backend
docker build \
--build-arg CLIENT_ID=${{ secrets.CLIENT_ID }} \
--build-arg CLIENT_SECRET=${{ secrets.CLIENT_SECRET }} \
--build-arg TENANT_ID=${{ secrets.TENANT_ID }} \
--build-arg KEY_VAULT_NAME=${{ secrets.KEY_VAULT_NAME }} \
--build-arg BACKEND_URL=${{ secrets.BACKEND_URL }} \
--build-arg FRONTEND_URL=${{ secrets.FRONTEND_URL }} \
--build-arg HMAC_SECRET=${{ secrets.HMAC_SECRET }} \
--build-arg WEBHOOK_URL=${{ secrets.WEBHOOK_URL }} \
-t ghcr.io/nickjongens/keyfade-backend:latest .
docker push ghcr.io/nickjongens/keyfade-backend:latest