From 00cdd71c2d294a656277685c04a1bd70aedd04af Mon Sep 17 00:00:00 2001 From: Andrew <5755685+arnidan@users.noreply.github.com> Date: Wed, 27 Dec 2023 19:11:33 +0100 Subject: [PATCH] build docker image with github actions --- .github/workflows/build-docker-image.yaml | 34 +++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/build-docker-image.yaml diff --git a/.github/workflows/build-docker-image.yaml b/.github/workflows/build-docker-image.yaml new file mode 100644 index 0000000..36f64ac --- /dev/null +++ b/.github/workflows/build-docker-image.yaml @@ -0,0 +1,34 @@ +name: build docker image + +on: + push: + branches: + - master + +jobs: + build: + runs-on: ubuntu-latest + permissions: + packages: write + contents: read + steps: + - uses: actions/checkout@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Log in to registry + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build and push + uses: docker/build-push-action@v3 + with: + context: . + push: true + tags: ghcr.io/${{ github.repository }}:latest + cache-from: type=gha + cache-to: type=gha,mode=max \ No newline at end of file