Nightly (pipsqueak) #765
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
# Builds the Docker from scratch and runs tests (on pipsqueak). | |
name: Nightly (pipsqueak) | |
on: | |
schedule: | |
# 1am PDT. | |
- cron: '0 8 * * *' | |
jobs: | |
cleaner: | |
runs-on: self-hosted | |
steps: | |
- name: Runner workspace path | |
run: | | |
echo "Cleaning up previous run" | |
rm -rf "${{ github.workspace }}" | |
build-and-test: | |
# Make sure we clean up the directory first. The runner does not remove | |
# files from old runs. | |
needs: cleaner | |
runs-on: self-hosted | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
token: ${{ secrets.PAT }} | |
- name: Build the Docker image | |
id: build | |
run: | | |
export TAG=3la-docker:$(date +%s) | |
echo "::set-output name=TAG::$TAG" | |
eval `ssh-agent -s` | |
ssh-add | |
DOCKER_BUILDKIT=1 docker build \ | |
. \ | |
--file Dockerfile \ | |
--ssh default \ | |
--build-arg SSH_KEY="$(cat ~/.ssh/id_rsa)" \ | |
--tag $TAG | |
- name: Run tests | |
run: docker run --env EVAL_TYPE=1 ${{ steps.build.outputs.TAG }} ./run.sh |