Skip to content

Build within Docker #49

Build within Docker

Build within Docker #49

Workflow file for this run

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
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'
secrets: |
SENTRY_AUTH_TOKEN: ${{ github.event_name == 'push' && secrets.SENTRY_AUTH_TOKEN || '' }}
NEXT_PUBLIC_SENTRY_DSN: ${{ secrets.NEXT_PUBLIC_SENTRY_DSN }}