Skip to content

Commit faae368

Browse files
committed
Configure Composer authentication in workflows Add Composer auth
configuration to lint.yml and tests.yml
1 parent d341fa0 commit faae368

2 files changed

Lines changed: 32 additions & 0 deletions

File tree

.github/workflows/lint.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,22 @@ jobs:
2424
with:
2525
php-version: '8.4'
2626

27+
- name: Configure Composer authentication
28+
run: |
29+
cat <<EOF > auth.json
30+
{
31+
"http-basic": {
32+
"nativephp.composer.sh": {
33+
"username": "${{ secrets.COMPOSER_NATIVEPHP_EMAIL }}",
34+
"password": "${{ secrets.COMPOSER_NATIVEPHP_AUTH_TOKEN }}"
35+
}
36+
}
37+
}
38+
EOF
39+
40+
- name: Debug auth.json
41+
run: cat auth.json
42+
2743
- name: Install Dependencies
2844
run: |
2945
composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist

.github/workflows/tests.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,22 @@ jobs:
3434
- name: Install Node Dependencies
3535
run: npm ci
3636

37+
- name: Configure Composer authentication
38+
run: |
39+
cat <<EOF > auth.json
40+
{
41+
"http-basic": {
42+
"nativephp.composer.sh": {
43+
"username": "${{ secrets.COMPOSER_NATIVEPHP_EMAIL }}",
44+
"password": "${{ secrets.COMPOSER_NATIVEPHP_AUTH_TOKEN }}"
45+
}
46+
}
47+
}
48+
EOF
49+
50+
- name: Debug auth.json
51+
run: cat auth.json
52+
3753
- name: Install Dependencies
3854
run: composer install --no-interaction --prefer-dist --optimize-autoloader
3955

0 commit comments

Comments
 (0)