From 33763e8b2728bb3e6ce6800a78bdf0556fdd084e Mon Sep 17 00:00:00 2001 From: Benjamin AIMARD Date: Fri, 13 Nov 2026 06:57:15 +0000 Subject: [PATCH 1/4] =?UTF-8?q?ci:=20limiter=20=C3=A0=20deux=20minutes=20l?= =?UTF-8?q?e=20t=C3=A9l=C3=A9chargement=20Nextcloud=20de=20publication?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5b4cfa77..4386ecd7 100755 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -115,7 +115,7 @@ jobs: id: server-checkout run: | NCVERSION='${{ fromJSON(steps.appinfo.outputs.result).nextcloud.min-version }}' - wget --quiet --timeout=30 --tries=2 "https://download.nextcloud.com/server/releases/latest-$NCVERSION.zip" + timeout 120 wget --quiet --timeout=30 --tries=2 "https://download.nextcloud.com/server/releases/latest-$NCVERSION.zip" unzip latest-$NCVERSION.zip - name: Checkout compatible server stable branch fallback From 89b70a594d228a9c9e943f48d48849d9ba4652f3 Mon Sep 17 00:00:00 2001 From: Benjamin AIMARD Date: Fri, 13 Nov 2026 06:57:44 +0000 Subject: [PATCH 2/4] =?UTF-8?q?ci:=20reprendre=20temporairement=20la=20pub?= =?UTF-8?q?lication=20du=20tag=203.4.8=20inchang=C3=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/release-348-recovery.yml | 180 +++++++++++++++++++++ 1 file changed, 180 insertions(+) create mode 100644 .github/workflows/release-348-recovery.yml diff --git a/.github/workflows/release-348-recovery.yml b/.github/workflows/release-348-recovery.yml new file mode 100644 index 00000000..4759c118 --- /dev/null +++ b/.github/workflows/release-348-recovery.yml @@ -0,0 +1,180 @@ +name: Recover Gestion 3.4.8 publication +'on': + push: + branches: + - codex/issue-699 + paths: + - .github/workflows/release-348-recovery.yml +jobs: + container: + runs-on: ubuntu-latest + permissions: + contents: write + actions: write + steps: + - name: Check actor permission + uses: skjnldsv/check-actor-permission@69e92a3c4711150929bca9fcf34448c5bf5526e7 + with: + require: write + - name: Stop the initial publication before retrying + id: recovery + uses: actions/github-script@v7 + with: + script: |- + const params = {owner: context.repo.owner, repo: context.repo.repo, run_id: 43381005553}; + let run = (await github.rest.actions.getWorkflowRun(params)).data; + if (run.conclusion === 'success') { + core.notice('Initial publication already succeeded; no retry needed.'); + core.setOutput('needed', 'false'); + return; + } + if (run.status !== 'completed') { + await github.rest.actions.cancelWorkflowRun(params); + for (let attempt = 0; attempt < 24; attempt++) { + await new Promise(resolve => setTimeout(resolve, 5000)); + run = (await github.rest.actions.getWorkflowRun(params)).data; + if (run.status === 'completed') break; + } + if (run.status !== 'completed') throw new Error('Initial publication still running; retry aborted to avoid concurrent writes.'); + } + core.setOutput('needed', run.conclusion === 'success' ? 'false' : 'true'); + - name: Set app env + env: + RELEASE_TAG: ${{ github.event.release.tag_name }} + REQUESTED_RELEASE_TAG: ${{ inputs.release_tag }} + run: | + echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> "$GITHUB_ENV" + case "$GITHUB_EVENT_NAME" in + release) APP_VERSION="$RELEASE_TAG" ;; + push) APP_VERSION="3.4.8" ;; + workflow_dispatch) APP_VERSION="$REQUESTED_RELEASE_TAG" ;; + *) exit 1 ;; + esac + [[ "$APP_VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] + echo "APP_VERSION=$APP_VERSION" >> "$GITHUB_ENV" + if: ${{ steps.recovery.outputs.needed == 'true' }} + - name: Checkout + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + with: + persist-credentials: 'false' + path: ${{ env.APP_NAME }} + ref: ${{ env.APP_VERSION }} + if: ${{ steps.recovery.outputs.needed == 'true' }} + - name: Get app version number + id: app-version + uses: skjnldsv/xpath-action@f5b036e9d973f42c86324833fd00be90665fbf77 + with: + filename: ${{ env.APP_NAME }}/appinfo/info.xml + expression: //info//version/text() + if: ${{ steps.recovery.outputs.needed == 'true' }} + - name: Validate app version against tag + run: | + [ "${{ env.APP_VERSION }}" = "${{ fromJSON(steps.app-version.outputs.result).version }}" ] + if: ${{ steps.recovery.outputs.needed == 'true' }} + - name: Get appinfo data + id: appinfo + uses: skjnldsv/xpath-action@f5b036e9d973f42c86324833fd00be90665fbf77 + with: + filename: ${{ env.APP_NAME }}/appinfo/info.xml + expression: //info//dependencies//nextcloud/@min-version + if: ${{ steps.recovery.outputs.needed == 'true' }} + - name: Get php version + id: php-versions + uses: icewind1991/nextcloud-version-matrix@58becf3b4bb6dc6cef677b15e2fd8e7d48c0908f + with: + filename: ${{ env.APP_NAME }}/appinfo/info.xml + if: ${{ steps.recovery.outputs.needed == 'true' }} + - name: Set up php ${{ steps.php-versions.outputs.php-min }} + uses: shivammathur/setup-php@cf4cade2721270509d5b1c766ab3549210a39a2a + with: + php-version: ${{ steps.php-versions.outputs.php-min }} + coverage: none + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + if: ${{ steps.recovery.outputs.needed == 'true' }} + - name: Set up Node.js 24 + uses: actions/setup-node@v4 + with: + node-version: '24' + if: ${{ steps.recovery.outputs.needed == 'true' }} + - name: Audit locked PHP dependencies + working-directory: ${{ env.APP_NAME }} + run: composer audit --locked + if: ${{ steps.recovery.outputs.needed == 'true' }} + - name: Audit locked JavaScript dependencies + working-directory: ${{ env.APP_NAME }} + run: npm audit --package-lock-only --audit-level=low + if: ${{ steps.recovery.outputs.needed == 'true' }} + - name: Install Composer dependencies (no-dev) + run: | + cd ${{ env.APP_NAME }} + composer install --no-dev --prefer-dist --no-progress --no-suggest + if: ${{ steps.recovery.outputs.needed == 'true' }} + - name: Install JavaScript dependencies + working-directory: ${{ env.APP_NAME }} + run: npm ci + if: ${{ steps.recovery.outputs.needed == 'true' }} + - name: Build production JavaScript + working-directory: ${{ env.APP_NAME }} + run: make build-js-production + if: ${{ steps.recovery.outputs.needed == 'true' }} + - name: Verify production JavaScript bundles + working-directory: ${{ env.APP_NAME }} + run: make verify-js-production + if: ${{ steps.recovery.outputs.needed == 'true' }} + - name: Checkout server ${{ fromJSON(steps.appinfo.outputs.result).nextcloud.min-version }} + continue-on-error: 'true' + id: server-checkout + run: | + NCVERSION='${{ fromJSON(steps.appinfo.outputs.result).nextcloud.min-version }}' + timeout 120 wget --quiet --timeout=30 --tries=2 "https://download.nextcloud.com/server/releases/latest-$NCVERSION.zip" + unzip latest-$NCVERSION.zip + if: ${{ steps.recovery.outputs.needed == 'true' }} + - name: Checkout compatible server stable branch fallback + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + if: ${{ steps.recovery.outputs.needed == 'true' && (steps.server-checkout.outcome != 'success') }} + with: + persist-credentials: 'false' + submodules: 'true' + repository: nextcloud/server + ref: stable${{ fromJSON(steps.appinfo.outputs.result).nextcloud.min-version }} + path: nextcloud + - name: Package and sign app + run: | + echo '${{ secrets.APP_PRIVATE_KEY }}' > ${{ env.APP_NAME }}.key + wget --quiet "https://github.com/nextcloud/app-certificate-requests/raw/master/${{ env.APP_NAME }}/${{ env.APP_NAME }}.crt" + cd ${{ env.APP_NAME }} + make appstore APP_PRIVATE_KEY="../${{ env.APP_NAME }}.key" APP_CERTIFICATE="../${{ env.APP_NAME }}.crt" occ="php ../nextcloud/occ" + cd build/artifacts/appstore + openssl dgst -sha512 -sign ../../../../${{ env.APP_NAME }}.key ./${{ env.APP_NAME }}.tar.gz | openssl base64 > ./shasum.txt + cat ./shasum.txt + if: ${{ steps.recovery.outputs.needed == 'true' }} + - name: Attach tarball to github release + uses: svenstaro/upload-release-action@04733e069f2d7f7f0b4aebc4fbdbce8613b03ccd + id: attach_to_release + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: ${{ env.APP_NAME }}/build/artifacts/appstore/${{ env.APP_NAME }}.tar.gz + asset_name: ${{ env.APP_NAME }}-${{ env.APP_VERSION }}.tar.gz + tag: ${{ env.APP_VERSION }} + overwrite: 'true' + if: ${{ steps.recovery.outputs.needed == 'true' }} + - name: Upload shasum to release + uses: svenstaro/upload-release-action@04733e069f2d7f7f0b4aebc4fbdbce8613b03ccd + id: attach_to_release_shasum + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: ${{ env.APP_NAME }}/build/artifacts/appstore/shasum.txt + asset_name: shasum.${{ env.APP_VERSION }}.txt + tag: ${{ env.APP_VERSION }} + overwrite: 'true' + if: ${{ steps.recovery.outputs.needed == 'true' }} + - name: Upload app to Nextcloud appstore + uses: nextcloud-releases/nextcloud-appstore-push-action@a011fe619bcf6e77ddebc96f9908e1af4071b9c1 + with: + app_name: ${{ env.APP_NAME }} + appstore_token: ${{ secrets.APPSTORE_TOKEN }} + download_url: ${{ steps.attach_to_release.outputs.browser_download_url }} + app_private_key: ${{ secrets.APP_PRIVATE_KEY }} + if: ${{ steps.recovery.outputs.needed == 'true' }} + if: github.event.deleted == false From bcde0fb25972373349bf2b652de70c16f06f8fb6 Mon Sep 17 00:00:00 2001 From: Benjamin AIMARD Date: Fri, 13 Nov 2026 06:58:40 +0000 Subject: [PATCH 3/4] =?UTF-8?q?ci:=20corriger=20le=20type=20bool=C3=A9en?= =?UTF-8?q?=20du=20secours=20de=20reprise?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/release-348-recovery.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-348-recovery.yml b/.github/workflows/release-348-recovery.yml index 4759c118..6f0e597a 100644 --- a/.github/workflows/release-348-recovery.yml +++ b/.github/workflows/release-348-recovery.yml @@ -123,7 +123,7 @@ jobs: run: make verify-js-production if: ${{ steps.recovery.outputs.needed == 'true' }} - name: Checkout server ${{ fromJSON(steps.appinfo.outputs.result).nextcloud.min-version }} - continue-on-error: 'true' + continue-on-error: true id: server-checkout run: | NCVERSION='${{ fromJSON(steps.appinfo.outputs.result).nextcloud.min-version }}' From 10dcf633bdb80fd527679f8f92cd53926d8e0dc6 Mon Sep 17 00:00:00 2001 From: Benjamin AIMARD Date: Fri, 13 Nov 2026 07:03:31 +0000 Subject: [PATCH 4/4] =?UTF-8?q?ci:=20retirer=20la=20reprise=20temporaire?= =?UTF-8?q?=20apr=C3=A8s=20publication=20r=C3=A9ussie?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/release-348-recovery.yml | 180 --------------------- 1 file changed, 180 deletions(-) delete mode 100644 .github/workflows/release-348-recovery.yml diff --git a/.github/workflows/release-348-recovery.yml b/.github/workflows/release-348-recovery.yml deleted file mode 100644 index 6f0e597a..00000000 --- a/.github/workflows/release-348-recovery.yml +++ /dev/null @@ -1,180 +0,0 @@ -name: Recover Gestion 3.4.8 publication -'on': - push: - branches: - - codex/issue-699 - paths: - - .github/workflows/release-348-recovery.yml -jobs: - container: - runs-on: ubuntu-latest - permissions: - contents: write - actions: write - steps: - - name: Check actor permission - uses: skjnldsv/check-actor-permission@69e92a3c4711150929bca9fcf34448c5bf5526e7 - with: - require: write - - name: Stop the initial publication before retrying - id: recovery - uses: actions/github-script@v7 - with: - script: |- - const params = {owner: context.repo.owner, repo: context.repo.repo, run_id: 43381005553}; - let run = (await github.rest.actions.getWorkflowRun(params)).data; - if (run.conclusion === 'success') { - core.notice('Initial publication already succeeded; no retry needed.'); - core.setOutput('needed', 'false'); - return; - } - if (run.status !== 'completed') { - await github.rest.actions.cancelWorkflowRun(params); - for (let attempt = 0; attempt < 24; attempt++) { - await new Promise(resolve => setTimeout(resolve, 5000)); - run = (await github.rest.actions.getWorkflowRun(params)).data; - if (run.status === 'completed') break; - } - if (run.status !== 'completed') throw new Error('Initial publication still running; retry aborted to avoid concurrent writes.'); - } - core.setOutput('needed', run.conclusion === 'success' ? 'false' : 'true'); - - name: Set app env - env: - RELEASE_TAG: ${{ github.event.release.tag_name }} - REQUESTED_RELEASE_TAG: ${{ inputs.release_tag }} - run: | - echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> "$GITHUB_ENV" - case "$GITHUB_EVENT_NAME" in - release) APP_VERSION="$RELEASE_TAG" ;; - push) APP_VERSION="3.4.8" ;; - workflow_dispatch) APP_VERSION="$REQUESTED_RELEASE_TAG" ;; - *) exit 1 ;; - esac - [[ "$APP_VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] - echo "APP_VERSION=$APP_VERSION" >> "$GITHUB_ENV" - if: ${{ steps.recovery.outputs.needed == 'true' }} - - name: Checkout - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - with: - persist-credentials: 'false' - path: ${{ env.APP_NAME }} - ref: ${{ env.APP_VERSION }} - if: ${{ steps.recovery.outputs.needed == 'true' }} - - name: Get app version number - id: app-version - uses: skjnldsv/xpath-action@f5b036e9d973f42c86324833fd00be90665fbf77 - with: - filename: ${{ env.APP_NAME }}/appinfo/info.xml - expression: //info//version/text() - if: ${{ steps.recovery.outputs.needed == 'true' }} - - name: Validate app version against tag - run: | - [ "${{ env.APP_VERSION }}" = "${{ fromJSON(steps.app-version.outputs.result).version }}" ] - if: ${{ steps.recovery.outputs.needed == 'true' }} - - name: Get appinfo data - id: appinfo - uses: skjnldsv/xpath-action@f5b036e9d973f42c86324833fd00be90665fbf77 - with: - filename: ${{ env.APP_NAME }}/appinfo/info.xml - expression: //info//dependencies//nextcloud/@min-version - if: ${{ steps.recovery.outputs.needed == 'true' }} - - name: Get php version - id: php-versions - uses: icewind1991/nextcloud-version-matrix@58becf3b4bb6dc6cef677b15e2fd8e7d48c0908f - with: - filename: ${{ env.APP_NAME }}/appinfo/info.xml - if: ${{ steps.recovery.outputs.needed == 'true' }} - - name: Set up php ${{ steps.php-versions.outputs.php-min }} - uses: shivammathur/setup-php@cf4cade2721270509d5b1c766ab3549210a39a2a - with: - php-version: ${{ steps.php-versions.outputs.php-min }} - coverage: none - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - if: ${{ steps.recovery.outputs.needed == 'true' }} - - name: Set up Node.js 24 - uses: actions/setup-node@v4 - with: - node-version: '24' - if: ${{ steps.recovery.outputs.needed == 'true' }} - - name: Audit locked PHP dependencies - working-directory: ${{ env.APP_NAME }} - run: composer audit --locked - if: ${{ steps.recovery.outputs.needed == 'true' }} - - name: Audit locked JavaScript dependencies - working-directory: ${{ env.APP_NAME }} - run: npm audit --package-lock-only --audit-level=low - if: ${{ steps.recovery.outputs.needed == 'true' }} - - name: Install Composer dependencies (no-dev) - run: | - cd ${{ env.APP_NAME }} - composer install --no-dev --prefer-dist --no-progress --no-suggest - if: ${{ steps.recovery.outputs.needed == 'true' }} - - name: Install JavaScript dependencies - working-directory: ${{ env.APP_NAME }} - run: npm ci - if: ${{ steps.recovery.outputs.needed == 'true' }} - - name: Build production JavaScript - working-directory: ${{ env.APP_NAME }} - run: make build-js-production - if: ${{ steps.recovery.outputs.needed == 'true' }} - - name: Verify production JavaScript bundles - working-directory: ${{ env.APP_NAME }} - run: make verify-js-production - if: ${{ steps.recovery.outputs.needed == 'true' }} - - name: Checkout server ${{ fromJSON(steps.appinfo.outputs.result).nextcloud.min-version }} - continue-on-error: true - id: server-checkout - run: | - NCVERSION='${{ fromJSON(steps.appinfo.outputs.result).nextcloud.min-version }}' - timeout 120 wget --quiet --timeout=30 --tries=2 "https://download.nextcloud.com/server/releases/latest-$NCVERSION.zip" - unzip latest-$NCVERSION.zip - if: ${{ steps.recovery.outputs.needed == 'true' }} - - name: Checkout compatible server stable branch fallback - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - if: ${{ steps.recovery.outputs.needed == 'true' && (steps.server-checkout.outcome != 'success') }} - with: - persist-credentials: 'false' - submodules: 'true' - repository: nextcloud/server - ref: stable${{ fromJSON(steps.appinfo.outputs.result).nextcloud.min-version }} - path: nextcloud - - name: Package and sign app - run: | - echo '${{ secrets.APP_PRIVATE_KEY }}' > ${{ env.APP_NAME }}.key - wget --quiet "https://github.com/nextcloud/app-certificate-requests/raw/master/${{ env.APP_NAME }}/${{ env.APP_NAME }}.crt" - cd ${{ env.APP_NAME }} - make appstore APP_PRIVATE_KEY="../${{ env.APP_NAME }}.key" APP_CERTIFICATE="../${{ env.APP_NAME }}.crt" occ="php ../nextcloud/occ" - cd build/artifacts/appstore - openssl dgst -sha512 -sign ../../../../${{ env.APP_NAME }}.key ./${{ env.APP_NAME }}.tar.gz | openssl base64 > ./shasum.txt - cat ./shasum.txt - if: ${{ steps.recovery.outputs.needed == 'true' }} - - name: Attach tarball to github release - uses: svenstaro/upload-release-action@04733e069f2d7f7f0b4aebc4fbdbce8613b03ccd - id: attach_to_release - with: - repo_token: ${{ secrets.GITHUB_TOKEN }} - file: ${{ env.APP_NAME }}/build/artifacts/appstore/${{ env.APP_NAME }}.tar.gz - asset_name: ${{ env.APP_NAME }}-${{ env.APP_VERSION }}.tar.gz - tag: ${{ env.APP_VERSION }} - overwrite: 'true' - if: ${{ steps.recovery.outputs.needed == 'true' }} - - name: Upload shasum to release - uses: svenstaro/upload-release-action@04733e069f2d7f7f0b4aebc4fbdbce8613b03ccd - id: attach_to_release_shasum - with: - repo_token: ${{ secrets.GITHUB_TOKEN }} - file: ${{ env.APP_NAME }}/build/artifacts/appstore/shasum.txt - asset_name: shasum.${{ env.APP_VERSION }}.txt - tag: ${{ env.APP_VERSION }} - overwrite: 'true' - if: ${{ steps.recovery.outputs.needed == 'true' }} - - name: Upload app to Nextcloud appstore - uses: nextcloud-releases/nextcloud-appstore-push-action@a011fe619bcf6e77ddebc96f9908e1af4071b9c1 - with: - app_name: ${{ env.APP_NAME }} - appstore_token: ${{ secrets.APPSTORE_TOKEN }} - download_url: ${{ steps.attach_to_release.outputs.browser_download_url }} - app_private_key: ${{ secrets.APP_PRIVATE_KEY }} - if: ${{ steps.recovery.outputs.needed == 'true' }} - if: github.event.deleted == false