-
Notifications
You must be signed in to change notification settings - Fork 2
97 lines (89 loc) · 2.97 KB
/
build_upload_all.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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
name: Build & Upload All
on: [workflow_dispatch]
jobs:
antithesis:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
# These secrets would need to be populated in your repo and named
# this way if you want to copy-and-paste this configuration.
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PAT }}
# There is a lot of copy-and-paste in these sections.
# This could be streamlined by using a matrix configuration, which would
# parameterize the extract and build stages. However, it would run both the
# setup and teardown sections N times, once for each of the N containers we
# are going to build and deploy.
- name: Extract metadata (tags) for Docker workload
id: meta-workload
uses: docker/metadata-action@v5
with:
images: antithesishq/demo-workload
tags: |
type=sha
antithesis
- name: Extract metadata (tags) for Docker Go config
id: meta-go-config
uses: docker/metadata-action@v5
with:
images: antithesishq/demo-go-config
tags: |
type=sha
antithesis
- name: Extract metadata (tags) for Docker Go control
id: meta-go-control
uses: docker/metadata-action@v5
with:
images: antithesishq/demo-go-control
tags: |
type=sha
antithesis
- name: Extract metadata (tags) for Docker Go vault
id: meta-go-vault
uses: docker/metadata-action@v5
with:
images: antithesishq/demo-go-vault
tags: |
type=sha
antithesis
# Now build and push each of the containers.
- name: Build and push workload
uses: docker/build-push-action@v5
with:
context: ./workload
file: ./workload/Dockerfile.workload
push: true
tags: ${{ steps.meta-workload.outputs.tags }}
labels: ${{ steps.meta-workload.outputs.labels }}
- name: Build and push Go config
uses: docker/build-push-action@v5
with:
context: ./go
file: ./go/Dockerfile.config
push: true
tags: ${{ steps.meta-go-config.outputs.tags }}
labels: ${{ steps.meta-go-config.outputs.labels }}
- name: Build and push Go control
uses: docker/build-push-action@v5
with:
context: ./go
file: ./go/Dockerfile.control
push: true
tags: ${{ steps.meta-go-control.outputs.tags }}
labels: ${{ steps.meta-go-control.outputs.labels }}
- name: Build and push Go vault
uses: docker/build-push-action@v5
with:
context: ./go
file: ./go/Dockerfile.vault
push: true
tags: ${{ steps.meta-go-vault.outputs.tags }}
labels: ${{ steps.meta-go-vault.outputs.labels }}