-
Notifications
You must be signed in to change notification settings - Fork 18
47 lines (47 loc) · 1.53 KB
/
build_and_push_docker_images.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: Build and Push Docker Images
on:
push:
workflow_dispatch:
inputs:
build_docker_images:
description: 'If ''true'', force a build of the docker images and push them to dockerhub'
required: false
default: false
jobs:
build-docker-images:
if: ${{ github.ref_type == 'tag' || github.event.inputs.build_docker_images }}
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build and push deps.Dockerfile
uses: docker/build-push-action@v4
with:
context: ./
file: ./docker/deps.Dockerfile
builder: ${{ steps.buildx.outputs.name }}
push: true
tags: hdfgroup/hermes-deps:latest
- name: Build and push dev.Dockerfile
uses: docker/build-push-action@v4
with:
context: ./
file: ./docker/dev.Dockerfile
builder: ${{ steps.buildx.outputs.name }}
push: true
tags: hdfgroup/hermes-dev:latest
- name: Build and push user.Dockerfile
uses: docker/build-push-action@v4
with:
context: ./
file: ./docker/user.Dockerfile
builder: ${{ steps.buildx.outputs.name }}
push: true
tags: hdfgroup/hermes:latest