-
Notifications
You must be signed in to change notification settings - Fork 86
156 lines (135 loc) · 4.71 KB
/
build-push-containers-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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
name: 📦 Build Push Containers
run-name: Building containers for ${{ github.event.pull_request.head || github.ref_name }}
on:
pull_request:
types:
- labeled
- opened
- synchronize
push:
branches:
- main
tags:
- '[0-9]*.[0-9]*.[0-9]*'
jobs:
read-github-context-object:
runs-on: ubuntu-latest
steps:
# I know this is not pretty (debug information) but it's useful to have this
- name: Read github context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: |
echo "GITHUB_SHA=${GITHUB_SHA}"
echo "INFO: github context object content below"
echo "${GITHUB_CONTEXT}"
build-push-checked-containers:
if: contains(github.event.pull_request.labels.*.name, 'cicd:movement-containers') || github.ref == 'refs/heads/main' || github.event.label.name == 'cicd:movement-containers'
uses: ./.github/workflows/build-push-container.yml
name: Build Push Checked Containers
secrets: inherit
strategy:
matrix:
container_name:
- movement-celestia-da-light-node
- movement-celestia-appd
- movement-celestia-bridge
- movement-full-node-setup
- wait-for-celestia-light-node
- movement-full-node
- movement-faucet-service
- movement-tests-e2e-simple-interaction
- movement-indexer
- movement-tests-e2e-followers-consistent
- movement-util
with:
container_name: ${{ matrix.container_name }}
build-push-checked-manifest:
if: contains(github.event.pull_request.labels.*.name, 'cicd:movement-containers') || github.ref == 'refs/heads/main' || github.event.label.name == 'cicd:movement-containers'
uses: ./.github/workflows/build-push-manifest.yml
name: Build Push Checked Manifest
needs:
- build-push-checked-containers
secrets: inherit
strategy:
matrix:
container_name:
- movement-celestia-da-light-node
- movement-celestia-appd
- movement-celestia-bridge
- movement-full-node-setup
- wait-for-celestia-light-node
- movement-full-node
- movement-faucet-service
- movement-tests-e2e-simple-interaction
- movement-indexer
- movement-tests-e2e-followers-consistent
- movement-util
with:
container_name: ${{ matrix.container_name }}
container-checks:
if: contains(github.event.pull_request.labels.*.name, 'cicd:movement-containers') || github.ref == 'refs/heads/main' || github.event.label.name == 'cicd:movement-containers'
runs-on: buildjet-16vcpu-ubuntu-2204
needs:
- build-push-checked-manifest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: true
ref: ${{ github.event.pull_request.head.ref || github.ref }}
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@main
- name: Read the commit SHA
id: vars
run: |
commit_hash=$(git rev-parse HEAD | cut -c1-7)
echo CONTAINER_REV=${commit_hash}
echo "CONTAINER_REV=${commit_hash}" >> .env
- name: Display .env file
run: cat .env
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y wget
- name: Install docker-ce-cli
run: |
sudo apt-get install -y docker-ce-cli
- name: Verify Docker Installation
run: |
docker compose version
docker --version
docker version
- name: Run docker-compose local.setup.test
run: |
nix develop --command bash -c "just container-tests"
# run again to test restarts
# nix develop --command bash -c "just container-tests"
### Unchecked containers
build-push-unchecked-containers:
if: contains(github.event.pull_request.labels.*.name, 'cicd:bridge-containers') || github.ref == 'refs/heads/main' || github.event.label.name == 'cicd:bridge-containers'
uses: ./.github/workflows/build-push-container.yml
name: Build Push Unchecked Containers
secrets: inherit
strategy:
matrix:
container_name:
- bridge-service
- bridge-setup
- helios
with:
container_name: ${{ matrix.container_name }}
build-push-unchecked-manifest:
uses: ./.github/workflows/build-push-manifest.yml
name: Build Push Unchecked Manifest
needs:
- build-push-unchecked-containers
secrets: inherit
strategy:
matrix:
container_name:
- bridge-service
- bridge-setup
- helios
with:
container_name: ${{ matrix.container_name }}