From a6737b7d647bba9d00b2fc0d090ee3c03788d9e7 Mon Sep 17 00:00:00 2001 From: Faried Abu Zaid Date: Fri, 9 Feb 2024 15:52:59 +0100 Subject: [PATCH] adopt pipelines to ghcr.io --- .github/workflows/docker_build.yaml | 67 -------------------------- .github/workflows/test_and_render.yaml | 7 ++- 2 files changed, 3 insertions(+), 71 deletions(-) delete mode 100644 .github/workflows/docker_build.yaml diff --git a/.github/workflows/docker_build.yaml b/.github/workflows/docker_build.yaml deleted file mode 100644 index e153503..0000000 --- a/.github/workflows/docker_build.yaml +++ /dev/null @@ -1,67 +0,0 @@ -name: Build docker image with the presentation - -on: - push: - branches: [main] - 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/checkout@v2.3.1 - 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-probabilistic-model-checking - tags: | - type=sha - - name: Build and push - uses: docker/build-push-action@v4 - with: - context: . - no-cache: true - 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-probabilistic-model-checking:latest - cache-to: type=inline diff --git a/.github/workflows/test_and_render.yaml b/.github/workflows/test_and_render.yaml index bc586db..c189c29 100644 --- a/.github/workflows/test_and_render.yaml +++ b/.github/workflows/test_and_render.yaml @@ -10,11 +10,10 @@ jobs: test_and_render: runs-on: ubuntu-latest container: - image: europe-west3-docker.pkg.dev/tfl-prod-ea3b/tfl-docker/tfl-training-probabilistic-model-checking:latest - options: --user root + image: ghcr.io/aai-institute/tfl-training-probabilistic-model-checking:main credentials: - username: _json_key - password: ${{ secrets.GAR_JSON_KEY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} steps: - name: Checkout uses: actions/checkout@v2