Skip to content

Commit

Permalink
Merge pull request #196 from crazy-max/check-status
Browse files Browse the repository at this point in the history
Check desired output status
  • Loading branch information
Tõnis Tiigi authored and GitHub committed Oct 23, 2020
2 parents 5b4307d + 25af97b commit c58c687
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: ci

on:
workflow_dispatch:
push:
branches:
- master
Expand Down Expand Up @@ -211,6 +212,7 @@ jobs:
uses: docker/setup-buildx-action@v1
-
name: Build
id: docker_build
continue-on-error: true
uses: ./
with:
Expand All @@ -219,6 +221,14 @@ jobs:
platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/ppc64le,linux/s390x
push: true
tags: localhost:5000/name/app:latest
-
name: Check
run: |
echo "${{ toJson(steps.docker_build) }}"
if [ "${{ steps.docker_build.outcome }}" != "failure" ] || [ "${{ steps.docker_build.conclusion }}" != "success" ]; then
echo "::error::Should have failed"
exit 1
fi
-
name: Dump context
if: always()
Expand All @@ -243,13 +253,25 @@ jobs:
uses: actions/checkout@v2.3.3
-
name: Build
id: docker_build
continue-on-error: ${{ matrix.push }}
uses: ./
with:
context: ./test
file: ./test/Dockerfile
push: ${{ matrix.push }}
tags: localhost:5000/name/app:latest
-
name: Check
run: |
echo "${{ toJson(steps.docker_build) }}"
if [ "${{ matrix.push }}" = "false" ]; then
exit 0
fi
if [ "${{ steps.docker_build.outcome }}" != "failure" ] || [ "${{ steps.docker_build.conclusion }}" != "success" ]; then
echo "::error::Should have failed"
exit 1
fi
-
name: Dump context
if: always()
Expand Down

0 comments on commit c58c687

Please sign in to comment.