From b72e6e74bfd439081629b1709564e7acbced2cf8 Mon Sep 17 00:00:00 2001 From: Elyan Date: Sun, 13 Oct 2024 13:22:16 +0200 Subject: [PATCH] Add custom asciidoctor image CI build --- .gitea/workflows/image.yaml | 43 +++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .gitea/workflows/image.yaml diff --git a/.gitea/workflows/image.yaml b/.gitea/workflows/image.yaml new file mode 100644 index 0000000..6225faf --- /dev/null +++ b/.gitea/workflows/image.yaml @@ -0,0 +1,43 @@ +# Based on https://github.com/riscv/riscv-docs-base-container-image/blob/main/.github/workflows/build.yaml +name: Build and publish custom Asciidoctor image + +on: + push: + branches: [master] + paths: + - "docker/Dockerfile" + +jobs: + build: + name: Build and push to Container Registry + runs-on: ubuntu-22.04 + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v3 + + - name: Login to Gitea Container Registry + uses: docker/login-action@v3 + with: + registry: git.elyanpoujol.fr + username: ${{ secrets.CONTAINER_REGISTRY_USERNAME }} + password: ${{ secrets.CONTAINER_REGISTRY_TOKEN }} + + - name: Get Current Date + run: echo "NOW=$(date +'%m%d%Y')" >> "$GITEA_ENV" + + - name: Build image and push to Docker Hub + uses: docker/build-push-action@v6 + with: + context: ./docker + platforms: linux/amd64,linux/arm64 + tags: | + docker-asciidoctor-wavedrom:${{ github.sha }} + docker-asciidoctor-wavedrom:latest + push: true