Skip to content

Commit

Permalink
Add frontend build
Browse files Browse the repository at this point in the history
  • Loading branch information
frankh committed May 25, 2023
1 parent 5c0ae6b commit 9cf0c85
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
id: meta
uses: docker/metadata-action@v4
with:
images: ghcr.io/${{ github.repository }}/housewatch
images: ghcr.io/${{ github.repository }}/api
tags: |
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }}
type=raw,value=main,enable=${{ github.ref == 'refs/heads/main' }}
Expand Down
51 changes: 51 additions & 0 deletions .github/workflows/docker-frontend.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Docker build

on:
push:

jobs:
docker:
runs-on: ubuntu-latest

permissions:
contents: read
packages: write

steps:
-
uses: actions/checkout@v3
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
with:
platforms: arm64
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
name: Docker image metadata
id: meta
uses: docker/metadata-action@v4
with:
images: ghcr.io/${{ github.repository }}/frontend
tags: |
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }}
type=raw,value=main,enable=${{ github.ref == 'refs/heads/main' }}
type=ref,event=pr
type=sha
-
name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v4
with:
context: frontend/
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

0 comments on commit 9cf0c85

Please sign in to comment.