Skip to content
This repository has been archived by the owner on Mar 7, 2024. It is now read-only.

Commit

Permalink
Update build-docker.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Yalz authored Sep 13, 2023
1 parent 0d2bf03 commit f55c832
Showing 1 changed file with 61 additions and 4 deletions.
65 changes: 61 additions & 4 deletions .github/workflows/build-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,74 @@ on:
pull_request:
branches: [ "main" ]

env:
REGISTRY: ghcr.io

jobs:
Front-End:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build the Docker image
run: docker build ./vue-frontend --file ./vue-frontend/Dockerfile --tag vsds-demonstrator-ui:$(date +%s)
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
driver-opts: |
image=moby/buildkit:v0.10.6
- name: Log in to the GitHub Container registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: Informatievlaanderen
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/Informatievlaanderen/vsds-demonstrator-ui
tags: |
type=raw,value=$(date +'%Y%m%d%H%M%S')
type=raw,value=latest
- name: Build and push Docker image
uses: docker/build-push-action@v3
with:
context: ./vue-frontend
push: true
file: ./vue-frontend/Dockerfile
tags: ${{ steps.meta.outputs.tags }}
platforms: linux/amd64,linux/arm64

Back-end:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build the Docker image
run: docker build ./spring-boot-backend --file ./spring-boot-backend/Dockerfile --tag vsds-demonstrator-server:$(date +%s)
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
driver-opts: |
image=moby/buildkit:v0.10.6
- name: Log in to the GitHub Container registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: Informatievlaanderen
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/Informatievlaanderen/vsds-demonstrator-server
tags: |
type=raw,value=$(date +'%Y%m%d%H%M%S')
type=raw,value=latest
- name: Build and push Docker image
uses: docker/build-push-action@v3
with:
context: ./spring-boot-backend/
push: true
file: ./spring-boot-backend/Dockerfile
tags: ${{ steps.meta.outputs.tags }}
platforms: linux/amd64,linux/arm64

0 comments on commit f55c832

Please sign in to comment.