try checking registry
This commit is contained in:
parent
c565047f5c
commit
b3882c32f5
1 changed files with 11 additions and 11 deletions
22
.github/workflows/release_stable.yml
vendored
22
.github/workflows/release_stable.yml
vendored
|
@ -17,14 +17,14 @@ env:
|
||||||
DOCKER_NAMESPACE: jcpd
|
DOCKER_NAMESPACE: jcpd
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
check_release:
|
Check_image:
|
||||||
name: Check and compare official Dotclear version
|
name: Check and compare official Dotclear version
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
outputs:
|
outputs:
|
||||||
version: ${{ steps.dotclear.outputs.version }}
|
version: ${{ steps.dotclear.outputs.version }}
|
||||||
exists: ${{ steps.container.outputs.image_exists }}
|
exists: ${{ steps.registry.outputs.image_exists }}
|
||||||
steps:
|
steps:
|
||||||
- name: Download and parse last version
|
- name: Download and parse last version
|
||||||
id: dotclear
|
id: dotclear
|
||||||
|
@ -34,30 +34,30 @@ jobs:
|
||||||
echo version=$(cat versions.xml | xq -x "//release[@name='${{ env.DOTCLEAR_CANAL }}']/@version") >> $GITHUB_OUTPUT
|
echo version=$(cat versions.xml | xq -x "//release[@name='${{ env.DOTCLEAR_CANAL }}']/@version") >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Check registry image
|
- name: Check registry image
|
||||||
id: container
|
id: registry
|
||||||
uses: k4kratik/container-image-check-custom-action@v4
|
uses: k4kratik/container-image-check-custom-action@v4
|
||||||
with:
|
with:
|
||||||
type: dockerhub
|
type: dockerhub
|
||||||
container_repo_name: ${{ env.DOCKER_NAMESPACE }}/${{ env.DOTCLEAR_IMAGE }}
|
container_repo_name: ${{ env.DOCKER_NAMESPACE }}/${{ env.DOTCLEAR_IMAGE }}
|
||||||
image_tag: ${{ steps.dotclear..outputs.version }}
|
image_tag: ${{ steps.dotclear.outputs.version }}
|
||||||
dockerhub_username: ${{ secrets.DOCKER_USERNAME }}
|
dockerhub_username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
dockerhub_token: ${{ secrets.DOCKER_TOKEN }}
|
dockerhub_token: ${{ secrets.DOCKER_TOKEN }}
|
||||||
|
|
||||||
- name: notfound
|
- name: notfound
|
||||||
if: (steps.container.outputs.image_exists == 'false')
|
if: (steps.registry.outputs.image_exists == 'false')
|
||||||
run: |
|
run: |
|
||||||
SUMMARY=$'Image ${{ env.DOCKER_NAMESPACE }}/${{ env.DOTCLEAR_IMAGE }}:${{ steps.dotclear..outputs.version }} not found.'
|
SUMMARY=$'Image ${{ env.DOCKER_NAMESPACE }}/${{ env.DOTCLEAR_IMAGE }}:${{ steps.dotclear..outputs.version }} not found.'
|
||||||
echo "$SUMMARY" >> $GITHUB_STEP_SUMMARY
|
echo "$SUMMARY" >> $GITHUB_STEP_SUMMARY
|
||||||
|
|
||||||
- name: found
|
- name: found
|
||||||
if: (steps.container.outputs.image_exists == 'true')
|
if: (steps.registry.outputs.image_exists == 'true')
|
||||||
run: |
|
run: |
|
||||||
SUMMARY=$'Image ${{ env.DOCKER_NAMESPACE }}/${{ env.DOTCLEAR_IMAGE }}:${{ steps.dotclear..outputs.version }} found.'
|
SUMMARY=$'Image ${{ env.DOCKER_NAMESPACE }}/${{ env.DOTCLEAR_IMAGE }}:${{ steps.dotclear..outputs.version }} found.'
|
||||||
echo "$SUMMARY" >> $GITHUB_STEP_SUMMARY
|
echo "$SUMMARY" >> $GITHUB_STEP_SUMMARY
|
||||||
|
|
||||||
do_image:
|
do_image:
|
||||||
needs: check_release
|
needs: Check_image
|
||||||
if: ((needs.check_release.outputs.exists == 'false') || (github.event.inputs.rebuild == 'true'))
|
if: ((needs.Check_image.outputs.exists == 'false') || (github.event.inputs.rebuild == 'true'))
|
||||||
name: Build and push latest and versionned images
|
name: Build and push latest and versionned images
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
permissions:
|
||||||
|
@ -98,9 +98,9 @@ jobs:
|
||||||
sbom: true
|
sbom: true
|
||||||
push: true
|
push: true
|
||||||
tags: |
|
tags: |
|
||||||
${{ env.DOCKER_NAMESPACE }}/${{ env.DOTCLEAR_IMAGE }}:${{ needs.check_release.outputs.version }}
|
${{ env.DOCKER_NAMESPACE }}/${{ env.DOTCLEAR_IMAGE }}:${{ needs.Check_image.outputs.version }}
|
||||||
${{ env.DOCKER_NAMESPACE }}/${{ env.DOTCLEAR_IMAGE }}:latest
|
${{ env.DOCKER_NAMESPACE }}/${{ env.DOTCLEAR_IMAGE }}:latest
|
||||||
ghcr.io/${{ env.GITHUB_REPOSITORY }}:${{ needs.check_release.outputs.version }}
|
ghcr.io/${{ env.GITHUB_REPOSITORY }}:${{ needs.Check_image.outputs.version }}
|
||||||
ghcr.io/${{ env.GITHUB_REPOSITORY }}:latest
|
ghcr.io/${{ env.GITHUB_REPOSITORY }}:latest
|
||||||
build-args: CANAL=${{ env.DOTCLEAR_CANAL }}
|
build-args: CANAL=${{ env.DOTCLEAR_CANAL }}
|
||||||
platforms: linux/386,linux/amd64,linux/arm64,linux/arm/V7
|
platforms: linux/386,linux/amd64,linux/arm64,linux/arm/V7
|
||||||
|
@ -115,4 +115,4 @@ jobs:
|
||||||
to: ${{ secrets.TELEGRAM_ID }}
|
to: ${{ secrets.TELEGRAM_ID }}
|
||||||
token: ${{ secrets.TELEGRAM_TOKEN }}
|
token: ${{ secrets.TELEGRAM_TOKEN }}
|
||||||
format: markdown
|
format: markdown
|
||||||
message: Images __${{ env.DOTCLEAR_IMAGE }}:latest__ and __${{ env.DOTCLEAR_IMAGE }}:${{ needs.check_release.outputs.version }}__ successfully generated.
|
message: Images __${{ env.DOTCLEAR_IMAGE }}:latest__ and __${{ env.DOTCLEAR_IMAGE }}:${{ needs.Check_image.outputs.version }}__ successfully generated.
|
||||||
|
|
Loading…
Reference in a new issue