From 9ac5487a0479edbedec546bc39c79a961cdf6cd9 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 13 Nov 2025 14:21:08 +0000 Subject: [PATCH 1/5] Initial plan From 77e5a8428cf5ed7151051d875f1faf2605fd34c9 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 13 Nov 2025 14:23:50 +0000 Subject: [PATCH 2/5] Add copilot-setup-steps.yml workflow file Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com> --- .github/workflows/copilot-setup-steps.yml | 33 +++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/copilot-setup-steps.yml diff --git a/.github/workflows/copilot-setup-steps.yml b/.github/workflows/copilot-setup-steps.yml new file mode 100644 index 0000000..335f2ba --- /dev/null +++ b/.github/workflows/copilot-setup-steps.yml @@ -0,0 +1,33 @@ +name: "Copilot Setup Steps" + +on: + workflow_dispatch: + push: + paths: + - .github/workflows/copilot-setup-steps.yml + pull_request: + paths: + - .github/workflows/copilot-setup-steps.yml + +jobs: + copilot-setup-steps: + runs-on: ubuntu-latest + permissions: + contents: read + + steps: + - name: Checkout code + uses: actions/checkout@v5 + + - name: Set up PHP environment + uses: shivammathur/setup-php@v2 + with: + php-version: 'latest' + ini-values: zend.assertions=1, error_reporting=-1, display_errors=On + coverage: 'none' + tools: composer,cs2pr + env: + COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Install Composer dependencies & cache dependencies + uses: ramsey/composer-install@v3 From b3b71c966a2101cb81e58ef7e90cb49bea90eee5 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 13 Nov 2025 14:33:47 +0000 Subject: [PATCH 3/5] Add copilot-setup-steps.yml to sync-workflows.yml Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com> --- .github/workflows/sync-workflows.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/sync-workflows.yml b/.github/workflows/sync-workflows.yml index e4a7316..971797f 100644 --- a/.github/workflows/sync-workflows.yml +++ b/.github/workflows/sync-workflows.yml @@ -23,6 +23,7 @@ jobs: ^.actrc ^.editorconfig ^.github/workflows/code-quality.yml + ^.github/workflows/copilot-setup-steps.yml ^.github/workflows/regenerate-readme.yml ^AGENTS.md TARGET_REPOS: | From ee1e47a48ad7d59cc2bc6b0765c69478c85635ad Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Thu, 13 Nov 2025 15:44:06 +0100 Subject: [PATCH 4/5] Update .github/workflows/copilot-setup-steps.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/copilot-setup-steps.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/copilot-setup-steps.yml b/.github/workflows/copilot-setup-steps.yml index 335f2ba..b5f38a2 100644 --- a/.github/workflows/copilot-setup-steps.yml +++ b/.github/workflows/copilot-setup-steps.yml @@ -31,3 +31,8 @@ jobs: - name: Install Composer dependencies & cache dependencies uses: ramsey/composer-install@v3 + env: + COMPOSER_ROOT_VERSION: dev-${{ github.event.repository.default_branch }} + with: + # Bust the cache at least once a month - output format: YYYY-MM. + custom-cache-suffix: $(date -u "+%Y-%m") From 03576e7aa6d3ae2f1f6a4ef6f0c99a8f065b4a1a Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 13 Nov 2025 14:48:36 +0000 Subject: [PATCH 5/5] Add composer.json existence check for extra hardening Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com> --- .github/workflows/copilot-setup-steps.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/copilot-setup-steps.yml b/.github/workflows/copilot-setup-steps.yml index b5f38a2..bf9327a 100644 --- a/.github/workflows/copilot-setup-steps.yml +++ b/.github/workflows/copilot-setup-steps.yml @@ -19,7 +19,14 @@ jobs: - name: Checkout code uses: actions/checkout@v5 + - name: Check existence of composer.json file + id: check_composer_file + uses: andstor/file-existence-action@v3 + with: + files: "composer.json" + - name: Set up PHP environment + if: steps.check_composer_file.outputs.files_exists == 'true' uses: shivammathur/setup-php@v2 with: php-version: 'latest' @@ -30,6 +37,7 @@ jobs: COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Install Composer dependencies & cache dependencies + if: steps.check_composer_file.outputs.files_exists == 'true' uses: ramsey/composer-install@v3 env: COMPOSER_ROOT_VERSION: dev-${{ github.event.repository.default_branch }}