diff --git a/.github/workflows/command-update-submodule.yml b/.github/workflows/command-update-submodule.yml new file mode 100644 index 0000000000..ef13ee8906 --- /dev/null +++ b/.github/workflows/command-update-submodule.yml @@ -0,0 +1,28 @@ +# SPDX-FileCopyrightText: 2026 LibreCode coop and contributors +# SPDX-License-Identifier: AGPL-3.0-or-later +name: Update submodule reference + +on: + issue_comment: # zizmor: ignore[dangerous-triggers] + types: [created] + +permissions: + contents: read + pull-requests: read + +jobs: + update: + if: github.event.issue.pull_request != '' && github.event.comment.body == '/update-3rdparty' + runs-on: ubuntu-latest + steps: + - name: Check actor permission + uses: skjnldsv/check-actor-permission@69e92a3c4711150929bca9fcf34448c5bf5526e7 # v3.0 + with: + require: write + + - name: Update merged submodule reference + uses: LibreCodeCoop/.github/actions/update-submodule@2a75cff7318334499053ced8b72d04bc0f795baf # source pinned + with: + token: ${{ secrets.COMMAND_BOT_PAT }} # zizmor: ignore[secrets-outside-env] + source-repository: LibreSign/3rdparty + submodule-path: 3rdparty diff --git a/.github/workflows/command-update-submodule.yml.patch b/.github/workflows/command-update-submodule.yml.patch new file mode 100644 index 0000000000..35cba2ef78 --- /dev/null +++ b/.github/workflows/command-update-submodule.yml.patch @@ -0,0 +1,34 @@ +--- a/.github/workflows/command-update-submodule.yml ++++ b/.github/workflows/command-update-submodule.yml +@@ -1,28 +1,28 @@ + # SPDX-FileCopyrightText: 2026 LibreCode coop and contributors + # SPDX-License-Identifier: AGPL-3.0-or-later + name: Update submodule reference + + on: + issue_comment: # zizmor: ignore[dangerous-triggers] + types: [created] + + permissions: + contents: read + pull-requests: read + + jobs: + update: +- if: github.event.issue.pull_request != '' && vars.SUBMODULE_UPDATE_COMMAND != '' && github.event.comment.body == vars.SUBMODULE_UPDATE_COMMAND ++ if: github.event.issue.pull_request != '' && github.event.comment.body == '/update-3rdparty' + runs-on: ubuntu-latest + steps: + - name: Check actor permission + uses: skjnldsv/check-actor-permission@69e92a3c4711150929bca9fcf34448c5bf5526e7 # v3.0 + with: + require: write + + - name: Update merged submodule reference + uses: LibreCodeCoop/.github/actions/update-submodule@2a75cff7318334499053ced8b72d04bc0f795baf # source pinned + with: + token: ${{ secrets.COMMAND_BOT_PAT }} # zizmor: ignore[secrets-outside-env] +- source-repository: ${{ vars.SUBMODULE_SOURCE_REPOSITORY }} ++ source-repository: LibreSign/3rdparty +- submodule-path: ${{ vars.SUBMODULE_PATH }} ++ submodule-path: 3rdparty