From c6100810998d8eeb016bf8e75a63bde3ad09fb4b Mon Sep 17 00:00:00 2001 From: Jean-Christian Denis Date: Sat, 7 Dec 2024 00:12:41 +0100 Subject: [PATCH 1/8] oopss --- .github/workflows/release_stable.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release_stable.yml b/.github/workflows/release_stable.yml index 54958a5..20eae9d 100644 --- a/.github/workflows/release_stable.yml +++ b/.github/workflows/release_stable.yml @@ -84,13 +84,13 @@ jobs: - name: notfound if: (steps.create.outputs.created == 'false') run: | - SUMMARY=$'Branch ${{ steps.dotclear.outputs.version }} has not been created.' + SUMMARY=$'Branch ${{ needs.check_image.outputs.version }} has not been created.' echo "$SUMMARY" >> $GITHUB_STEP_SUMMARY - name: found if: (steps.create.outputs.created == 'true') run: | - SUMMARY=$' Branch ${{ steps.dotclear.outputs.version }} has been created.' + SUMMARY=$' Branch ${{ needs.check_image.outputs.version }} has been created.' echo "$SUMMARY" >> $GITHUB_STEP_SUMMARY do_image: From e242b24f796bd236a4b783495adb9583679b6073 Mon Sep 17 00:00:00 2001 From: Jean-Christian Denis Date: Sat, 7 Dec 2024 00:33:07 +0100 Subject: [PATCH 2/8] add workflow to build from old versions --- .github/workflows/release_branch.yml | 69 ++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 .github/workflows/release_branch.yml diff --git a/.github/workflows/release_branch.yml b/.github/workflows/release_branch.yml new file mode 100644 index 0000000..f42e337 --- /dev/null +++ b/.github/workflows/release_branch.yml @@ -0,0 +1,69 @@ +name: Build and push image from branch + +on: + workflow_dispatch: + +env: + DOTCLEAR_IMAGE: docker-dotclear + DOCKER_NAMESPACE: jcpd + +jobs: + if: ((github.ref_name != 'master')) + name: Build and push selected version images + runs-on: ubuntu-latest + permissions: + packages: write + contents: read + attestations: write + id-token: write + steps: + - name: Check out the repo + uses: actions/checkout@v4 + with: + ref: ${{ github.ref_name }} + + - 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 Github registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: set lower case github repository + run: | + echo "GITHUB_REPOSITORY=${REPO,,}" >>${GITHUB_ENV} + env: + REPO: '${{ github.repository }}' + + - name: Build and push images + uses: docker/build-push-action@v6 + with: + context: . + sbom: true + push: true + tags: | + ${{ env.DOCKER_NAMESPACE }}/${{ env.DOTCLEAR_IMAGE }}:${{ github.ref_name }} + ghcr.io/${{ env.GITHUB_REPOSITORY }}:${{ github.ref_name }} + build-args: CANAL=stable + platforms: linux/386,linux/amd64,linux/arm64,linux/arm/V7 + cache-from: type=gha + cache-to: type=gha,mode=max + + - 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 }}:${{ github.ref_name }}__ successfully generated. From f4db10a21d1896650793f42eb4576ef1e062ce24 Mon Sep 17 00:00:00 2001 From: Jean-Christian Denis Date: Sat, 7 Dec 2024 00:36:22 +0100 Subject: [PATCH 3/8] oops --- .github/workflows/release_branch.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release_branch.yml b/.github/workflows/release_branch.yml index f42e337..7460148 100644 --- a/.github/workflows/release_branch.yml +++ b/.github/workflows/release_branch.yml @@ -8,7 +8,7 @@ env: DOCKER_NAMESPACE: jcpd jobs: - if: ((github.ref_name != 'master')) + if: (github.ref_name != 'master') name: Build and push selected version images runs-on: ubuntu-latest permissions: From 0cd6b339f0ce20d8ac3dfcbc7da935e5397d726e Mon Sep 17 00:00:00 2001 From: Jean-Christian Denis Date: Sat, 7 Dec 2024 00:37:08 +0100 Subject: [PATCH 4/8] one more oops --- .github/workflows/release_branch.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release_branch.yml b/.github/workflows/release_branch.yml index 7460148..7dd0429 100644 --- a/.github/workflows/release_branch.yml +++ b/.github/workflows/release_branch.yml @@ -8,7 +8,7 @@ env: DOCKER_NAMESPACE: jcpd jobs: - if: (github.ref_name != 'master') + if: ${{ github.ref_name != 'master' }} name: Build and push selected version images runs-on: ubuntu-latest permissions: From 03ae0715063565493a21732b2a01a84968924e3b Mon Sep 17 00:00:00 2001 From: Jean-Christian Denis Date: Sat, 7 Dec 2024 00:38:46 +0100 Subject: [PATCH 5/8] maybe another day --- .github/workflows/release_branch.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/release_branch.yml b/.github/workflows/release_branch.yml index 7dd0429..5a0f454 100644 --- a/.github/workflows/release_branch.yml +++ b/.github/workflows/release_branch.yml @@ -8,7 +8,6 @@ env: DOCKER_NAMESPACE: jcpd jobs: - if: ${{ github.ref_name != 'master' }} name: Build and push selected version images runs-on: ubuntu-latest permissions: From f0387bef59f2eb1562a54337e483a622eed1228b Mon Sep 17 00:00:00 2001 From: Jean-Christian Denis Date: Sat, 7 Dec 2024 00:40:24 +0100 Subject: [PATCH 6/8] ok I'm stupid --- .github/workflows/release_branch.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/release_branch.yml b/.github/workflows/release_branch.yml index 5a0f454..630b736 100644 --- a/.github/workflows/release_branch.yml +++ b/.github/workflows/release_branch.yml @@ -8,6 +8,8 @@ env: DOCKER_NAMESPACE: jcpd jobs: + build_image: + if: (github.ref_name != 'master') name: Build and push selected version images runs-on: ubuntu-latest permissions: From d1168cf533bd1d0dfe58ab5cb093d4428ef0771b Mon Sep 17 00:00:00 2001 From: Jean-Christian Denis Date: Sat, 7 Dec 2024 01:07:56 +0100 Subject: [PATCH 7/8] add option to clean repository --- .github/workflows/clean_repository.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/clean_repository.yml b/.github/workflows/clean_repository.yml index ccadffc..1ec8986 100644 --- a/.github/workflows/clean_repository.yml +++ b/.github/workflows/clean_repository.yml @@ -3,6 +3,17 @@ on: schedule: - cron: '45 11 * * 0' workflow_dispatch: + inputs: + days: + description: 'retain days' + required: true + default: 15 + type: choice + options: + - 1 + - 2 + - 7 + - 15 jobs: del_runs: @@ -16,5 +27,5 @@ jobs: with: token: ${{ github.token }} repository: ${{ github.repository }} - retain_days: 30 + retain_days: ${{ github.event.inputs.days }} keep_minimum_runs: 7 From ee60e71cf229a694b3a92b2f5b529bc80e13f450 Mon Sep 17 00:00:00 2001 From: Jean-Christian Denis Date: Sat, 7 Dec 2024 10:13:14 +0100 Subject: [PATCH 8/8] bump sysInfo 9.8 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index eeb04ed..8dd3cb6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -136,7 +136,7 @@ RUN curl -fsSL -o plugin.zip "https://github.com/JcDenis/dcLog/releases/download && rm plugin.zip # sysInfo -ENV VER_SI=9.7 +ENV VER_SI=9.8 RUN curl -fsSL -o plugin.zip "https://github.com/franck-paul/sysInfo/releases/download/$VER_SI/plugin-sysInfo-$VER_SI.zip" \ && mkdir -p /var/lib/dotclear/plugins/sysInfo \ && unzip -d /var/lib/dotclear/plugins plugin.zip \