Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 70 additions & 0 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: Docker Publish Test

on:
workflow_dispatch:

permissions:
contents: read

jobs:
publish:
name: Build and Push Images
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v6

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4

- name: Log in to Docker Hub
uses: docker/login-action@v4
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push web image
uses: docker/build-push-action@v7
with:
context: ./apps/web
target: runner
push: true
build-args: |
NEXT_PUBLIC_BUSINESS_ADDRESS=77 Finch Avenue East, Toronto, Ontario
NEXT_PUBLIC_INSTAGRAM_URL=https://www.instagram.com/nail_toronto_manisa/
tags: |
${{ vars.DOCKERHUB_USERNAME }}/manisa-web:${{ github.sha }}
${{ vars.DOCKERHUB_USERNAME }}/manisa-web:latest
cache-from: type=gha,scope=manisa-web
cache-to: type=gha,mode=max,scope=manisa-web
provenance: true
sbom: true

- name: Build and push database migration image
uses: docker/build-push-action@v7
with:
context: ./apps/web
target: database
push: true
tags: |
${{ vars.DOCKERHUB_USERNAME }}/manisa-database:${{ github.sha }}
${{ vars.DOCKERHUB_USERNAME }}/manisa-database:latest
cache-from: type=gha,scope=manisa-database
cache-to: type=gha,mode=max,scope=manisa-database
provenance: true
sbom: true

- name: Build and push worker image
uses: docker/build-push-action@v7
with:
context: ./apps/web
target: media-worker
push: true
tags: |
${{ vars.DOCKERHUB_USERNAME }}/manisa-worker:${{ github.sha }}
${{ vars.DOCKERHUB_USERNAME }}/manisa-worker:latest
cache-from: type=gha,scope=manisa-worker
cache-to: type=gha,mode=max,scope=manisa-worker
provenance: true
sbom: true
Loading