Skip to content

Commit

Permalink
Add test workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
zugao committed Mar 2, 2020
1 parent 348645e commit defd25d
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
-p "${{ secrets.dockerhub_token }}"

- name: Build ${{ matrix.image }}
run: docker build . -f ${{ matrix.image }}/Dockerfile
run: docker build src -f ${{ matrix.image }}/Dockerfile
--tag owasp/modsecurity-crs:${{ matrix.image }}
--tag owasp/modsecurity-crs:$(echo ${{ matrix.image }} | sed 's/.*-//')

Expand Down
27 changes: 27 additions & 0 deletions .github/workflows/verifyimage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Verify Images
on:
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
image:
- 3.3-apache
- 3.3-nginx
steps:
- uses: actions/checkout@v1
with:
fetch-depth: 1

- name: Build ${{ matrix.image }}
run: docker build . -f ${{ matrix.image }}/Dockerfile --tag test

- name: Run ${{ matrix.image }}
run: docker run -d --name ${{ matrix.image }} test

- name: Verify ${{ matrix.image }}
run: |
[ $(docker inspect ${{ matrix.image }} --format='{{.State.Running}}') = 'true' ]

0 comments on commit defd25d

Please sign in to comment.