Skip to content

Automatic deploy server #5

Automatic deploy server

Automatic deploy server #5

Workflow file for this run

name: Automatic build and push images to Docker
on: workflow_dispatch
jobs:
docker:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
include:
- dockerfile: ./server-web/Dockerfile
image: thaidmfinnick/fmecg-node-app
context: server-web
- dockerfile: ./frontend_web/Dockerfile
image: thaidmfinnick/fmecg-react-app
context: frontend_web
- dockerfile: ./frontend_web/bin/Dockerfile
image: thaidmfinnick/fmecg-bin-login
context: frontend_web/bin
- dockerfile: ./proxy/Dockerfile
image: thaidmfinnick/fmecg-proxy
context: proxy
permissions:
contents: read
packages: write
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ matrix.image }}
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: ${{ matrix.context }}
file: ${{ matrix.dockerfile }}
push: true
tags: latest
labels: ${{ steps.meta.outputs.labels }}