Files
budget/.github/workflows/docker.yml
T

53 lines
1.4 KiB
YAML

name: Build and Push Docker Image
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository }}
tags: |
type=ref,event=branch
type=ref,event=pr
type=sha
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
NEXT_PUBLIC_FIREBASE_API_KEY=dummy-api-key
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=dummy.firebaseapp.com
NEXT_PUBLIC_FIREBASE_PROJECT_ID=dummy-project
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=dummy-project.appspot.com
NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=123456789
NEXT_PUBLIC_FIREBASE_APP_ID=1:123456789:web:abcdef123456
NEXT_PUBLIC_ENCRYPTION_KEY=dummy-encryption-key