From b1053448600eacac2156104baf9c799a28ec8770 Mon Sep 17 00:00:00 2001 From: David Andersen <11966194+dtandersen@users.noreply.github.com> Date: Wed, 26 Jun 2024 14:22:57 -0700 Subject: [PATCH] Create docker.yaml --- .github/workflows/docker.yaml | 41 +++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/docker.yaml diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml new file mode 100644 index 0000000..745fcb7 --- /dev/null +++ b/.github/workflows/docker.yaml @@ -0,0 +1,41 @@ +name: Build notebook +on: + schedule: + - cron: '0 0 * * 0' + push: + +env: + REGISTRY: ghcr.io + IMAGE_NAME: ${{ github.repository }} + +jobs: + build-and-push-image: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + + steps: + - name: Checkout notebook + uses: actions/checkout@v3 + + - name: Log in to registry + uses: docker/login-action@v2 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Generate tags and labels + id: meta + uses: docker/metadata-action@v4 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + + - name: Build and push notebook + uses: docker/build-push-action@v4 + with: + context: . + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }}