name: build-docker-image on: workflow_call: secrets: registry-user: required: true type: string registry-password: required: true type: string jobs: docker: name: Build docker image runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 - name: Set up QEMU uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - name: Login in Private Registry uses: docker/login-action@v3 with: registry: git.palkoi.net username: ${{ secrets.registry-user }} password: ${{ secrets.registry-password }} - name: Build and push uses: docker/build-push-action@v5 with: context: . platforms: linux/amd64,linux/arm64 cache-from: type=registry,ref=git.palkoi.net/${{ env.GITHUB_REPOSITORY }},mode=max cache-to: type=registry,ref=git.palkoi.net/${{ env.GITHUB_REPOSITORY }},mode=max push: true tags: git.palkoi.net/${{ env.GITHUB_REPOSITORY }}:latest, git.palkoi.net/${{ env.GITHUB_REPOSITORY }}:${{ env.GITHUB_REF_NAME }}-${{ env.GITHUB_RUN_ID }}