docker-dotclear/.github/workflows/release_unstable.yml

56 lines
1.5 KiB
YAML
Raw Normal View History

name: Publish Dotclear unstable image to Docker Hub
2024-11-13 09:09:20 +00:00
on:
push:
schedule:
- cron: '0 3 * * *'
2024-11-13 09:09:20 +00:00
2024-11-13 10:02:42 +00:00
env:
IMAGE_NAME: jcpd/docker-dotclear:dev
2024-11-13 10:02:42 +00:00
DOTCLEAR_CANAL: unstable
2024-11-13 09:09:20 +00:00
jobs:
2024-11-13 09:46:32 +00:00
push_to_docker_hub:
name: Push Docker image to registry
2024-11-13 09:09:20 +00:00
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
attestations: write
id-token: write
steps:
- name: Check out the repo
uses: actions/checkout@v4
2024-11-13 10:02:42 +00:00
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
2024-11-13 09:09:20 +00:00
with:
username: ${{ secrets.DOCKER_USERNAME }}
2024-11-13 10:02:42 +00:00
password: ${{ secrets.DOCKER_TOKEN }}
2024-11-13 09:09:20 +00:00
2024-11-13 10:02:42 +00:00
- name: Build and push image
uses: docker/build-push-action@v6
2024-11-13 09:09:20 +00:00
with:
2024-11-13 10:02:42 +00:00
context: .
sbom: true
push: true
2024-11-13 10:07:52 +00:00
tags: ${{ env.IMAGE_NAME }}
2024-11-13 10:09:12 +00:00
build-args: CANAL=${{ env.DOTCLEAR_CANAL }}
2024-11-13 10:35:50 +00:00
platforms: linux/386,linux/amd64,linux/arm/V6
2024-11-13 12:33:38 +00:00
- 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 }}