From 4be952499c724c7897196a6111229cbee5daf3e2 Mon Sep 17 00:00:00 2001 From: Carl Date: Tue, 19 Dec 2023 17:47:14 +0000 Subject: [PATCH] docker container --- .github/workflows/docker.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/docker.yml diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml new file mode 100644 index 0000000..50813f5 --- /dev/null +++ b/.github/workflows/docker.yml @@ -0,0 +1,27 @@ +name: Docker Image CI +on: + workflow_dispatch: null + push: + paths: ['Dockerfile', 'requirements.txt'] +jobs: + build: + env: + REPO: "boettiger-lab/solara-test" + CONTAINER: "ghcr.io/boettiger-lab/solara-geospatial:latest" + runs-on: ubuntu-latest + permissions: write-all + steps: + - uses: actions/checkout@v3 + - name: Login to GitHub Container Registry + if: github.repository == ${{repo}} + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{github.actor}} + password: ${{secrets.GITHUB_TOKEN}} + - name: Build the Docker image + if: github.repository == ${{repo}} + run: docker build . --tag ${{CONTAINER}} + - name: Publish + if: github.repository == ${{repo}} + run: docker push ${{CONTAINER}} \ No newline at end of file