Skip to content

Commit 80da3e5

Browse files
committed
Update file(s) from wp-cli/.github
1 parent 14aea81 commit 80da3e5

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: "Copilot Setup Steps"
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
paths:
7+
- .github/workflows/copilot-setup-steps.yml
8+
pull_request:
9+
paths:
10+
- .github/workflows/copilot-setup-steps.yml
11+
12+
jobs:
13+
copilot-setup-steps:
14+
runs-on: ubuntu-latest
15+
permissions:
16+
contents: read
17+
18+
steps:
19+
- name: Checkout code
20+
uses: actions/checkout@v5
21+
22+
- name: Check existence of composer.json file
23+
id: check_composer_file
24+
uses: andstor/file-existence-action@v3
25+
with:
26+
files: "composer.json"
27+
28+
- name: Set up PHP environment
29+
if: steps.check_composer_file.outputs.files_exists == 'true'
30+
uses: shivammathur/setup-php@v2
31+
with:
32+
php-version: 'latest'
33+
ini-values: zend.assertions=1, error_reporting=-1, display_errors=On
34+
coverage: 'none'
35+
tools: composer,cs2pr
36+
env:
37+
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
38+
39+
- name: Install Composer dependencies & cache dependencies
40+
if: steps.check_composer_file.outputs.files_exists == 'true'
41+
uses: ramsey/composer-install@v3
42+
env:
43+
COMPOSER_ROOT_VERSION: dev-${{ github.event.repository.default_branch }}
44+
with:
45+
# Bust the cache at least once a month - output format: YYYY-MM.
46+
custom-cache-suffix: $(date -u "+%Y-%m")

0 commit comments

Comments
 (0)