From 3fe73eb2a6f9b24336f66f63b4c833e7d7798138 Mon Sep 17 00:00:00 2001 From: Jean-Christian Denis Date: Wed, 13 Nov 2024 16:59:36 +0100 Subject: [PATCH] add builder for stable release (WIP) --- .github/workflows/release_stable.yml | 56 ++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 .github/workflows/release_stable.yml diff --git a/.github/workflows/release_stable.yml b/.github/workflows/release_stable.yml new file mode 100644 index 0000000..4c0272d --- /dev/null +++ b/.github/workflows/release_stable.yml @@ -0,0 +1,56 @@ +name: Publish Dotclear unstable image to Docker Hub + +on: + push: + schedule: + - cron: '0 3 * * *' + +env: + IMAGE_NAME: jcpd/docker-dotclear:dev + DOTCLEAR_CANAL: unstable + +jobs: + push_to_docker_hub: + name: Push Docker image to registry + runs-on: ubuntu-latest + permissions: + packages: write + contents: read + attestations: write + id-token: write + steps: + - name: Check out the repo + uses: actions/checkout@v4 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_TOKEN }} + + - name: Build and push image + uses: docker/build-push-action@v6 + with: + context: . + sbom: true + push: true + tags: ${{ env.IMAGE_NAME }} + build-args: CANAL=${{ env.DOTCLEAR_CANAL }} + platforms: linux/386,linux/amd64,linux/arm/V6 + + - name: Send Telegram Message Ok + uses: appleboy/telegram-action@master + env: + GITHUB_CONTEXT: ${{toJSON(github)}} + with: + to: ${{ secrets.TELEGRAM_ID }} + token: ${{ secrets.TELEGRAM_TOKEN }} + format: markdown + message: | + Image successfully generated. + __Repository:__ *${{github.repository}} + __Image:__ ${{ env.IMAGE_NAME }} + __Canal:__ ${{ env.DOTCLEAR_CANAL }} \ No newline at end of file