Skip to content

Docker Image CI

Docker Image CI #17

Workflow file for this run

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
# we need to change kunai directory ownership
sudo chown -R 1000:1000 kunai
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