-
Notifications
You must be signed in to change notification settings - Fork 1
38 lines (32 loc) · 1.02 KB
/
build.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
name: Build
on:
push:
branches: ['master']
pull_request:
branches: ['master']
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to Docker Hub
uses: docker/login-action@v3
if: ${{ github.ref == 'refs/heads/master' }}
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
push: ${{ github.ref == 'refs/heads/master' }}
tags: benscobie/student-loan-repayment-calculator:latest
context: .
file: 'docker/Dockerfile.linux.amd64'
build-args: |
NEXT_PUBLIC_SENTRY_DSN=${{ vars.NEXT_PUBLIC_SENTRY_DSN }}
secrets: |
SENTRY_AUTH_TOKEN=${{ github.event_name == 'push' && secrets.SENTRY_AUTH_TOKEN || '' }}