fix(workflow): non interactive docker run #6
Workflow file for this run
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
name: Docker Image CI | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
schedule: | |
- cron: '37 13 * * *' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build the Docker image | |
run: docker build . --file Dockerfile --tag kunai-build | |
- name: Checkout Kunai | |
uses: actions/checkout@v3 | |
with: | |
repository: kunai-project/kunai | |
path: kunai | |
- name: Build Kunai | |
run: | | |
set -euxo pipefail | |
docker run -t --name japanese_knife -v $PWD/kunai:/kunai-src -w /kunai-src kunai-build cargo xbuild | |
exit_code=$(docker container inspect --format '{{.State.ExitCode}}' japanese_knife) | |
docker container rm japanese_knife | |
exit $exit_code |