From 1b44675f6b70cea12eda747c13a8f8a4ae0423c1 Mon Sep 17 00:00:00 2001 From: Aleksander Cynarski Date: Sat, 17 May 2025 10:26:30 +0200 Subject: [PATCH] Initial commit Signed-off-by: Aleksander Cynarski --- .gitea/install_latest_buildah.sh | 3 + .gitea/workflows/build.yml | 229 +++++++++++++++++++++++++++++++ 2 files changed, 232 insertions(+) create mode 100644 .gitea/install_latest_buildah.sh create mode 100644 .gitea/workflows/build.yml diff --git a/.gitea/install_latest_buildah.sh b/.gitea/install_latest_buildah.sh new file mode 100644 index 0000000..b779f78 --- /dev/null +++ b/.gitea/install_latest_buildah.sh @@ -0,0 +1,3 @@ +sudo apt-key add - < Release.key +sudo apt-get update -qq +sudo apt-get -qq -y install buildah diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml new file mode 100644 index 0000000..7d79370 --- /dev/null +++ b/.gitea/workflows/build.yml @@ -0,0 +1,229 @@ +name: Multiarch build +on: + push: + pull_request: + workflow_dispatch: + schedule: + - cron: '0 0 * * *' # every day at midnight + +env: + PROJECT_DIR: spring-petclinic + MVN_REPO_DIR: ~/.m2/repository + IMAGE_TAG: latest + +jobs: + build-multiarch-containerfile: + name: Build multi-architecture image using Containerfile + env: + IMAGE_NAME: hello-world-multiarch + runs-on: ubuntu-22.04 + strategy: + fail-fast: false + matrix: + install_latest: [ true, false ] + + steps: + + # Checkout buildah action github repository + - name: Checkout Buildah action + uses: actions/checkout@v4 + with: + path: "buildah-build" + + - name: Install latest buildah + if: matrix.install_latest + run: | + bash buildah-build/.gitea/install_latest_buildah.sh + + - name: Install qemu dependency + run: | + sudo apt-get update + sudo apt-get install -y qemu-user-static + + - name: Create Containerfile + run: | + cat > Containerfile< Containerfile<