From 68892d88643a2d4b812ebaf23139e7876e91038a Mon Sep 17 00:00:00 2001 From: Sebastian Hugentobler Date: Wed, 13 Dec 2023 09:58:01 +0100 Subject: [PATCH] try sharedf workflow --- .gitea/workflows/container.yaml | 39 +++++++++------------------------ 1 file changed, 10 insertions(+), 29 deletions(-) diff --git a/.gitea/workflows/container.yaml b/.gitea/workflows/container.yaml index b73fcef..174aded 100644 --- a/.gitea/workflows/container.yaml +++ b/.gitea/workflows/container.yaml @@ -1,31 +1,12 @@ -name: Build Container Image +name: Build Multiarch Container Image on: [push] jobs: - build-container: - runs-on: buildah-latest - steps: - - name: Check out repository code - uses: actions/checkout@v3 - - name: Split branch name - env: - REPO: ${{ gitea.repository }} - id: split - run: echo "::set-output name=repo_name::${REPO##*/}" - - name: Build image - id: build-image - uses: redhat-actions/buildah-build@v2 - with: - image: ${{ secrets.DOCKERHUB_USER }}/${{ steps.split.outputs.repo_name }} - tags: ${{ gitea.ref_name }} ${{ gitea.sha }} - archs: arm64, amd64 - containerfiles: | - ./Containerfile - - name: Push to dockerhub - id: push-to-dockerhub - uses: redhat-actions/push-to-registry@v2 - with: - image: ${{ steps.build-image.outputs.image }} - tags: ${{ steps.build-image.outputs.tags }} - registry: docker.io - username: ${{ secrets.DOCKERHUB_USER }} - password: ${{ secrets.DOCKERHUB_PW }} + call-reusable-workflow: + uses: https://new.code.vanwa.ch/container/multiarch-build-workflow/workflow.yml@main + with: + repository: ${{ gitea.repository }} + ref_name: ${{ gitea.ref_name }} + sha: ${{ gitea.sha }} + registry_url: ${{ secrets.REGISTRY_URL }} + registry_user: ${{ secrets.REGISTRY_USER }} + registry_pw: ${{ secrets.REGISTRY_PW }}