mirror of
https://github.com/taylanbakircioglu/haproxy-openmanager.git
synced 2026-09-22 10:33:33 +00:00
45 lines
1.2 KiB
YAML
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 }}
|
|
|