docker-dotclear/.github/workflows/release_unstable.yml
Jean-Christian Paul Denis d87da30ff4
Update release_unstable.yml
2024-11-23 21:17:43 +01:00

68 lines
1.9 KiB
YAML

name: Build and push dev image
on:
schedule:
- cron: '0 1 * * *'
workflow_dispatch:
env:
DOTCLEAR_IMAGE: docker-dotclear
DOTCLEAR_CANAL: unstable
DOCKER_NAMESPACE: jcpd
jobs:
do_image:
name: Build dev image and push to Docker hub
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: Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: set lower case owner name
run: |
echo "GITHUB_REPOSITORY=${REPO,,}" >>${GITHUB_ENV}
env:
REPO: '${{ github.repository }}'
- name: Build and push image
uses: docker/build-push-action@v6
with:
context: .
sbom: true
push: true
tags: |
${{ env.DOCKER_NAMESPACE }}/${{ env.DOTCLEAR_IMAGE }}:dev
ghcr.io/${{ env.GITHUB_REPOSITORY }}:dev
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 __${{ env.DOTCLEAR_IMAGE }}:dev__ successfully generated.