From 9b15b228b82307dc83a9118d2da15e2b5bf4510c Mon Sep 17 00:00:00 2001 From: mauwii Date: Tue, 25 Oct 2022 00:07:06 +0200 Subject: [PATCH] add action to build the container it does not push the container but verify buildability --- .github/workflows/build-container.yml | 39 +++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/build-container.yml diff --git a/.github/workflows/build-container.yml b/.github/workflows/build-container.yml new file mode 100644 index 0000000000..97f465a550 --- /dev/null +++ b/.github/workflows/build-container.yml @@ -0,0 +1,39 @@ +# Building the Image without pushing to confirm it is still buildable +# confirum functionality would unfortunately need way more resources +name: build container image +on: + push: + branches: + - 'main' + - 'development' + pull_request_target: + branches: + - 'main' + - 'development' + +jobs: + docker: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + - name: Cache Docker layers + uses: actions/cache@v2 + with: + path: /tmp/.buildx-cache + key: ${{ runner.os }}-buildx-${{ github.sha }} + restore-keys: ${{ runner.os }}-buildx- + - name: Build and push + uses: docker/build-push-action@v3 + with: + context: . + file: docker-build/Dockerfile + platforms: linux/amd64 + push: false + tags: ${{ github.repository }}:latest + cache-from: type=local,src=/tmp/.buildx-cache + cache-to: type=local,dest=/tmp/.buildx-cache