From 33998d6de0980649c6ee04f1721c427da714d9dd Mon Sep 17 00:00:00 2001 From: Evan Pratten Date: Wed, 6 Mar 2024 11:18:00 -0500 Subject: [PATCH] Write a CI script to auto-build the docker image --- .github/workflows/docker.yml | 39 ++++++++++++++++++++++++++++++++++++ 1 file changed, 39 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..07cc71c --- /dev/null +++ b/.github/workflows/docker.yml @@ -0,0 +1,39 @@ +name: Build & Publish Docker Container +on: + push: + branches: + - master + +env: + REGISTRY: ghcr.io + IMAGE_NAME: ewpratten/base + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v1 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + + - name: Log in to the Container registry + uses: docker/login-action@v2 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build and push + uses: docker/build-push-action@v2 + with: + context: . + file: ./Dockerfile + platforms: linux/amd64,linux/arm64 + push: true + tags: ewpratten/base:latest \ No newline at end of file