From 2c91c0c259a15bb446943a0caf5edffa58f285d3 Mon Sep 17 00:00:00 2001 From: Mathias Beaulieu-Duncan Date: Sat, 15 Feb 2025 12:21:44 -0500 Subject: [PATCH] update image name --- .gitea/workflows/publish-container.yaml | 65 +++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 .gitea/workflows/publish-container.yaml diff --git a/.gitea/workflows/publish-container.yaml b/.gitea/workflows/publish-container.yaml new file mode 100644 index 000000000..910758e41 --- /dev/null +++ b/.gitea/workflows/publish-container.yaml @@ -0,0 +1,65 @@ +name: Build and Publish Docker Image + +on: + release: + types: [published, prereleased] + +env: + IMAGE_NAME: openharbor/osrm-backend + +jobs: + publish: + strategy: + matrix: + docker-base-image: ["debian", "alpine"] + runs-on: ubuntu-latest + steps: + - name: Check out the repo + 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: Docker meta + id: meta + uses: docker/metadata-action@v4 + with: + images: ${{ env.IMAGE_NAME }} + + - name: Docker meta - debug + id: metadebug + uses: docker/metadata-action@v4 + with: + images: ${{ env.IMAGE_NAME }} + flavor: | + latest=true + suffix=-debug,onlatest=true + + - name: Log in to DockerHub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }} + + - name: Build and push debug image + uses: docker/build-push-action@v4 + with: + push: true + platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/ppc64le,linux/s390x,linux/riscv64 + file: ./docker/Dockerfile-${{ matrix.docker-base-image }} + tags: ${{ steps.metadebug.outputs.tags }} + build-args: | + DOCKER_TAG=${{ join(steps.metadebug.outputs.tags) }}-${{ matrix.docker-base-image }} + + - name: Build and push normal image + uses: docker/build-push-action@v4 + with: + push: true + platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/ppc64le,linux/s390x,linux/riscv64 + file: ./docker/Dockerfile-${{ matrix.docker-base-image }} + tags: ${{ steps.meta.outputs.tags }} + build-args: | + DOCKER_TAG=${{ join(steps.meta.outputs.tags) }}-${{ matrix.docker-base-image }}