-
-
Notifications
You must be signed in to change notification settings - Fork 326
71 lines (62 loc) · 2.11 KB
/
post-release-push-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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: Publish Docker image
on:
release:
types: [published]
workflow_dispatch:
jobs:
push_to_registry:
name: Push Docker images to Docker Hub
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
persist-credentials: true
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
# All-in-one Image Steps
- name: Extract metadata (tags, labels) for All-in-one Docker
id: meta_all_in_one
uses: docker/metadata-action@v3
with:
images: daveearley/hi.events-all-in-one
- name: Build and push All-in-one Docker image
uses: docker/build-push-action@v3
with:
context: ./
file: ./Dockerfile.all-in-one
push: true
tags: ${{ steps.meta_all_in_one.outputs.tags }}
labels: ${{ steps.meta_all_in_one.outputs.labels }}
# Backend Image Steps
- name: Extract metadata (tags, labels) for Backend Docker
id: meta_backend
uses: docker/metadata-action@v3
with:
images: daveearley/hi.events-backend
- name: Build and push Backend Docker image
uses: docker/build-push-action@v3
with:
context: ./backend
file: ./backend/Dockerfile
push: true
tags: ${{ steps.meta_backend.outputs.tags }}
labels: ${{ steps.meta_backend.outputs.labels }}
# Frontend Image Steps
- name: Extract metadata (tags, labels) for Frontend Docker
id: meta_frontend
uses: docker/metadata-action@v3
with:
images: daveearley/hi.events-frontend
- name: Build and push Frontend Docker image
uses: docker/build-push-action@v3
with:
context: ./frontend
file: ./frontend/Dockerfile.ssr
push: true
tags: ${{ steps.meta_frontend.outputs.tags }}
labels: ${{ steps.meta_frontend.outputs.labels }}