-
Notifications
You must be signed in to change notification settings - Fork 80
30 lines (27 loc) · 1009 Bytes
/
verifyimage.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
name: Verify Images
on:
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
strategy:
# Remember to match these with the buildimage.yml action
matrix:
version: ['v3.3.2']
server: ['apache', 'nginx']
steps:
- uses: actions/checkout@v1
with:
fetch-depth: 1
- name: Build ${{ matrix.version }}-${{ matrix.server }}
run: make VERSIONS=${{ matrix.version }} SERVERS=${{ matrix.server }} TAG=test
- name: Run ${{ matrix.version }}-${{ matrix.server }}
run: |
docker run -d --name ${{ matrix.version }}-${{ matrix.server }} test:${{ matrix.version }}-${{ matrix.server }}
docker logs --details ${{ matrix.version }}-${{ matrix.server }}
- name: Verify ${{ matrix.version }}-${{ matrix.server }}
run: |
docker inspect ${{ matrix.version }}-${{ matrix.server }}
[ $(docker inspect ${{ matrix.version }}-${{ matrix.server }} --format='{{.State.Running}}') = 'true' ]