Files
haproxy-openmanager/.github/workflows/docker-build.yml
T
2025-12-24 19:11:57 +03:00

45 lines
1.2 KiB
YAML

name: build and push docker images
on:
push:
branches: ["main"]
jobs:
build_and_push:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3
- name: generate version tag
id: version
run: echo "TAG=$(date +'%Y%m%d.%H%M')" >> $GITHUB_OUTPUT
- name: login to docker hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: build & push backend
uses: docker/build-push-action@v4
with:
context: ./backend
file: ./backend/Dockerfile
push: true
tags: |
taylanbakircioglu/haproxy-openmanager-backend:latest
taylanbakircioglu/haproxy-openmanager-backend:${{ steps.version.outputs.TAG }}
- name: build & push frontend
uses: docker/build-push-action@v4
with:
context: ./frontend
file: ./frontend/Dockerfile
push: true
tags: |
taylanbakircioglu/haproxy-openmanager-frontend:latest
taylanbakircioglu/haproxy-openmanager-frontend:${{ steps.version.outputs.TAG }}