2024-11-15 15:39:26 +00:00
|
|
|
name: Build and push dev image
|
2024-11-13 09:09:20 +00:00
|
|
|
|
|
|
|
on:
|
2024-11-13 10:24:03 +00:00
|
|
|
schedule:
|
2024-12-21 14:39:58 +00:00
|
|
|
- cron: '15 4 * * *'
|
2024-11-14 19:08:07 +00:00
|
|
|
workflow_dispatch:
|
2024-11-13 09:09:20 +00:00
|
|
|
|
2024-11-13 10:02:42 +00:00
|
|
|
env:
|
2024-11-23 20:08:03 +00:00
|
|
|
DOTCLEAR_IMAGE: docker-dotclear
|
2024-11-13 10:02:42 +00:00
|
|
|
DOTCLEAR_CANAL: unstable
|
2024-11-23 20:03:03 +00:00
|
|
|
DOCKER_NAMESPACE: jcpd
|
2024-11-13 10:02:42 +00:00
|
|
|
|
2024-11-13 09:09:20 +00:00
|
|
|
jobs:
|
2024-11-16 08:13:02 +00:00
|
|
|
do_image:
|
2024-11-24 08:09:21 +00:00
|
|
|
name: Build and push dev image
|
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-24 08:09:21 +00:00
|
|
|
- name: Log in to Github registry
|
2024-11-24 08:25:08 +00:00
|
|
|
uses: docker/login-action@v3
|
2024-11-23 20:03:03 +00:00
|
|
|
with:
|
|
|
|
registry: ghcr.io
|
|
|
|
username: ${{ github.actor }}
|
|
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
|
2024-11-24 08:09:21 +00:00
|
|
|
- name: set lower case github repository
|
2024-11-23 20:17:43 +00:00
|
|
|
run: |
|
|
|
|
echo "GITHUB_REPOSITORY=${REPO,,}" >>${GITHUB_ENV}
|
|
|
|
env:
|
|
|
|
REPO: '${{ github.repository }}'
|
|
|
|
|
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-23 20:03:03 +00:00
|
|
|
tags: |
|
|
|
|
${{ env.DOCKER_NAMESPACE }}/${{ env.DOTCLEAR_IMAGE }}:dev
|
2024-11-23 20:17:43 +00:00
|
|
|
ghcr.io/${{ env.GITHUB_REPOSITORY }}:dev
|
2024-11-13 10:09:12 +00:00
|
|
|
build-args: CANAL=${{ env.DOTCLEAR_CANAL }}
|
2024-12-21 15:02:12 +00:00
|
|
|
platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64/v8,linux/ppc64le,linux/riscv64,linux/s390x
|
2024-11-24 08:47:32 +00:00
|
|
|
cache-from: type=gha
|
|
|
|
cache-to: type=gha,mode=max
|
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
|
2024-11-23 20:03:03 +00:00
|
|
|
message: Image __${{ env.DOTCLEAR_IMAGE }}:dev__ successfully generated.
|