2022-10-24 22:07:06 +00:00
|
|
|
# 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'
|
2022-10-27 23:56:58 +00:00
|
|
|
pull_request:
|
2022-10-24 22:07:06 +00:00
|
|
|
branches:
|
|
|
|
- 'main'
|
|
|
|
- 'development'
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
docker:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2022-10-27 23:31:14 +00:00
|
|
|
- name: prepare docker-tag
|
|
|
|
env:
|
|
|
|
repository: ${{ github.repository }}
|
|
|
|
run: echo "dockertag=${repository,,}" >> $GITHUB_ENV
|
2022-10-24 22:07:06 +00:00
|
|
|
- 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
|
2022-10-27 23:31:14 +00:00
|
|
|
tags: ${{ env.dockertag }}:latest
|
2022-10-24 22:07:06 +00:00
|
|
|
cache-from: type=local,src=/tmp/.buildx-cache
|
|
|
|
cache-to: type=local,dest=/tmp/.buildx-cache
|