From 62045f283dbe5a763a333f0831158d904142056f Mon Sep 17 00:00:00 2001 From: Friedrich von Never Date: Sun, 2 Feb 2025 22:45:45 +0100 Subject: [PATCH 1/2] CI: start the CI on updated packages automatically --- .github/workflows/dependencies.yml | 18 ++++++++++++++++++ intellij-updater.json | 3 +-- src/scripts/Update-Dependencies.ps1 | 7 ------- 3 files changed, 19 insertions(+), 9 deletions(-) diff --git a/.github/workflows/dependencies.yml b/.github/workflows/dependencies.yml index f3877d2d..e28f3203 100644 --- a/.github/workflows/dependencies.yml +++ b/.github/workflows/dependencies.yml @@ -36,6 +36,15 @@ jobs: title: ${{ steps.update.outputs.pr-title }} body-path: ${{ steps.update.outputs.pr-body-path }} + - if: steps.update.outputs.has-changes == 'true' && (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') + name: Trigger CI + shell: pwsh + run: > + gh workflow run Main --ref $env:BRANCH_NAME && + gh workflow run Release --ref $env:BRANCH_NAME + env: + BRANCH_NAME: ${{ steps.update.outputs.branch-name }} + powershell-modules: permissions: contents: write @@ -61,3 +70,12 @@ jobs: commit-message: ${{ steps.update.outputs.commit-message }} title: ${{ steps.update.outputs.pr-title }} body-path: ${{ steps.update.outputs.pr-body-path }} + + - if: steps.update.outputs.has-changes == 'true' && (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') + name: Trigger CI + shell: pwsh + run: > + gh workflow run Main --ref $env:BRANCH_NAME && + gh workflow run Release --ref $env:BRANCH_NAME + env: + BRANCH_NAME: ${{ steps.update.outputs.branch-name }} diff --git a/intellij-updater.json b/intellij-updater.json index 20e9f501..101cb0ca 100644 --- a/intellij-updater.json +++ b/intellij-updater.json @@ -11,6 +11,5 @@ "field": "intellijPreview", "kind": "intellij-idea-community", "versionFlavor": "eap" - }], - "prBodyPrefix": "## Maintainer Note\n> [!WARNING]\n> This PR will not trigger CI by default. Please **close it and reopen manually** to trigger the CI.\n>\n> Unfortunately, this is a consequence of the current GitHub Action security model (by default, PRs created automatically aren't allowed to trigger other automation)." + }] } diff --git a/src/scripts/Update-Dependencies.ps1 b/src/scripts/Update-Dependencies.ps1 index 288be39b..5a04cc5f 100644 --- a/src/scripts/Update-Dependencies.ps1 +++ b/src/scripts/Update-Dependencies.ps1 @@ -137,13 +137,6 @@ if ($hasChanges) "@ } $prBody = @' -## Maintainer Note -> [!WARNING] -> This PR will not trigger CI by default. Please close it and reopen manually to trigger the CI. -> -> Unfortunately, this is a consequence of the current GitHub Action security model (by default, PRs created by bots -> aren't allowed to trigger other bots). - The updated packages' release notes follow below. '@ + $updateReleaseNoteStrings -join "`n" From d2eabf87ab8bf3fcf79017d04f397c4ac4d5bc42 Mon Sep 17 00:00:00 2001 From: Friedrich von Never Date: Sun, 2 Feb 2025 22:58:07 +0100 Subject: [PATCH 2/2] CI: add GitHub token to the secrets --- .github/workflows/dependencies.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/dependencies.yml b/.github/workflows/dependencies.yml index e28f3203..6ca5d70e 100644 --- a/.github/workflows/dependencies.yml +++ b/.github/workflows/dependencies.yml @@ -43,6 +43,7 @@ jobs: gh workflow run Main --ref $env:BRANCH_NAME && gh workflow run Release --ref $env:BRANCH_NAME env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} BRANCH_NAME: ${{ steps.update.outputs.branch-name }} powershell-modules: @@ -78,4 +79,5 @@ jobs: gh workflow run Main --ref $env:BRANCH_NAME && gh workflow run Release --ref $env:BRANCH_NAME env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} BRANCH_NAME: ${{ steps.update.outputs.branch-name }}