-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (58 loc) · 1.86 KB
/
matrix-docker-test.yaml
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
name: matrix-docker-test
on:
workflow_dispatch:
inputs:
tag:
description: 'Image tag of hyperledger/besu'
required: true
default: '24.5.4'
jobs:
verify:
strategy:
matrix:
combination:
# - tag: ${{ inputs.tag }}
# platform: ''
# runner: ubuntu-latest
- tag: ${{ inputs.tag }}-arm64
platform: 'linux/arm64'
runner: ubuntu-latest
# - tag: latest
# platform: ''
# runner: ubuntu-latest
# - tag: ${{ inputs.tag }}-amd64
# platform: ''
# runner: ubuntu-latest
runs-on: ${{ matrix.combination.runner }}
env:
CONTAINER_NAME: besu-check
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Start container
run: |
PLATFORM_OPT=""
[[ x${{ matrix.combination.platform }} != 'x' ]] && PLATFORM_OPT="--platform ${{ matrix.combination.platform }}"
docker run $PLATFORM_OPT --name ${{ env.CONTAINER_NAME }} hyperledger/besu:${{ matrix.combination.tag }}
- name: Verify besu container
run: |
success=false
while [[ $success != "true" && $RETRY -gt 0 ]]
do
docker logs ${{ env.CONTAINER_NAME }} | grep -q "Ethereum main loop is up" && success=true
RETRY=$(expr $RETRY - 1)
echo "Waiting for the container to start. Remaining retries $RETRY ..."
sleep $SLEEP
done
docker stop ${{ env.CONTAINER_NAME }} > /dev/null
if [[ $success != "true" ]]
then
docker ps -a
docker logs ${{ env.CONTAINER_NAME }}
echo "::error Could not find the log message 'Ethereum main loop is up'"
exit 1
fi
exit 0
env:
SLEEP: 5
RETRY: 10