54 lines
1.5 KiB
YAML
54 lines
1.5 KiB
YAML
name: Build and Push Docker Image
|
|
# test
|
|
|
|
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=AIzaSyAYZFoBQmi1PXPtHXOZy5agUBlt-WdrEM8
|
|
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=budget-dee6c.firebaseapp.com
|
|
NEXT_PUBLIC_FIREBASE_PROJECT_ID=budget-dee6c
|
|
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=budget-dee6c.appspot.com
|
|
NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=1084588982613
|
|
NEXT_PUBLIC_FIREBASE_APP_ID=1:1084588982613:web:df0c08f99b2f238ca96fdc
|
|
NEXT_PUBLIC_ENCRYPTION_KEY=default-encryption-key |