-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add CI workflow to ensure docker image continues to build and run (#1366
- Loading branch information
Showing
1 changed file
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--- | ||
name: "docker" | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
# Cancel already running jobs | ||
concurrency: | ||
group: docker_${{ github.head_ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
publish-image: | ||
name: "Build docker image and run smoke test" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Push image | ||
run: | | ||
# build image | ||
docker build -t shotover:test . | ||
# run image for 5 seconds and then send it SIGTERM, if it returns a nonzero exit code fail CI | ||
timeout --preserve-status 5 docker run --mount type=bind,source="$(pwd)"/shotover-proxy/config,target=/config shotover:test |