Merge pull request #70 from aai-institute/cleanup/adapt-title-page-to… #59
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: Build docker image with the presentation | |
on: | |
push: | |
branches: [master] | |
workflow_dispatch: | |
inputs: | |
reason: | |
description: Why did you need to rebuild the image? | |
required: False | |
default: Image built from master was outdated | |
jobs: | |
docker_build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/[email protected] | |
with: | |
fetch-depth: 0 | |
lfs: true | |
persist-credentials: false | |
# lfs=true is not enough, see https://stackoverflow.com/questions/61463578/github-actions-actions-checkoutv2-lfs-true-flag-not-converting-pointers-to-act | |
- name: Pull LFS Objects | |
run: git lfs pull | |
- name: validate notebooks | |
run: | | |
for notebook in notebooks/*.ipynb; do | |
if grep -q '# *%load ' "$notebook"; then | |
echo "$notebook contains an executed load statement. | |
This is not allowed inside the docker image for participants, make sure you remove this | |
in a future commit." | |
exit 255 | |
fi | |
done | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v1 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Login to GAR | |
uses: docker/login-action@v1 | |
with: | |
registry: europe-west3-docker.pkg.dev | |
username: _json_key | |
password: ${{ secrets.GAR_JSON_KEY }} | |
- name: Docker meta | |
id: meta | |
uses: docker/metadata-action@v3 | |
with: | |
flavor: | | |
latest=true | |
images: europe-west3-docker.pkg.dev/tfl-prod-ea3b/tfl-docker/tfl_training_anomaly_detection | |
tags: | | |
type=sha | |
- name: Build and push | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
push: true | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
build-args: | |
PARTICIPANT_BUCKET_READ_SECRET=${{ secrets.PARTICIPANT_BUCKET_READ_SECRET }} | |
cache-from: type=registry,ref=europe-west3-docker.pkg.dev/tfl-prod-ea3b/tfl-docker/tfl_training_anomaly_detection | |
cache-to: type=inline |