Skip to content

Commit 76e4b77

Browse files
authored
Tweak Workflows to use an env key (rappasoft#2090)
* Tweak Worrkflows to use an env key * Update run-tests-pcov-pull * Adjust Discord Release Workflow
1 parent 564c2f0 commit 76e4b77

File tree

6 files changed

+25
-9
lines changed

6 files changed

+25
-9
lines changed

.github/workflows/discord-releases.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,10 @@ jobs:
1010
uses: actions/checkout@v4
1111
- name: Package Releases
1212
uses: SethCohen/github-releases-to-discord@latest
13+
env:
14+
WEBHOOK_DISCORD_RELEASE_URL: ${{ secrets.WEBHOOK_DISCORD_RELEASE_URL }}
1315
with:
14-
webhook_url: ${{ secrets.WEBHOOK_DISCORD_RELEASE_URL }}
16+
webhook_url: $WEBHOOK_DISCORD_RELEASE_URL
1517
color: "2105893"
1618
username: "GitHub Release-Bot"
1719
avatar_url: "https://cdn.discordapp.com/avatars/487431320314576937/bd64361e4ba6313d561d54e78c9e7171.png"

.github/workflows/run-phpstan-pull.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,10 @@ jobs:
6666
restore-keys: phpstan-${{ matrix.os }}-PHP${{ matrix.php }}-L${{ matrix.laravel }}-composer-
6767

6868
- name: Add token
69+
env:
70+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6971
run: |
70-
composer config github-oauth.github.com ${{ secrets.GITHUB_TOKEN }}
72+
composer config github-oauth.github.com $GITHUB_TOKEN
7173
7274
- name: Install dependencies
7375
if: steps.composer-cache.outputs.cache-hit != 'true'

.github/workflows/run-phpstan.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,10 @@ jobs:
6969
restore-keys: phpstan-${{ matrix.os }}-PHP${{ matrix.php }}-L${{ matrix.laravel }}-composer-
7070

7171
- name: Add token
72+
env:
73+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7274
run: |
73-
composer config github-oauth.github.com ${{ secrets.GITHUB_TOKEN }}
75+
composer config github-oauth.github.com $GITHUB_TOKEN
7476
7577
- name: Install dependencies
7678
if: steps.composer-cache.outputs.cache-hit != 'true'

.github/workflows/run-tests-pcov-pull.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,10 @@ jobs:
7171
restore-keys: ${{ matrix.os }}-PHP${{ matrix.php }}-L${{ matrix.laravel }}-composer-
7272

7373
- name: Add token
74+
env:
75+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7476
run: |
75-
composer config github-oauth.github.com ${{ secrets.GITHUB_TOKEN }}
77+
composer config github-oauth.github.com $GITHUB_TOKEN
7678
7779
- name: Install dependencies
7880
if: steps.composer-cache.outputs.cache-hit != 'true'
@@ -93,7 +95,7 @@ jobs:
9395
env:
9496
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
9597
with:
96-
token: ${{ secrets.CODECOV_TOKEN }}
98+
token: $CODECOV_TOKEN
9799
files: ./coverage.xml
98100
verbose: true
99101

.github/workflows/run-tests-pull.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,10 @@ jobs:
6868
restore-keys: ${{ matrix.os }}-PHP${{ matrix.php }}-L${{ matrix.laravel }}-composer-
6969

7070
- name: Add token
71+
env:
72+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7173
run: |
72-
composer config github-oauth.github.com ${{ secrets.GITHUB_TOKEN }}
74+
composer config github-oauth.github.com $GITHUB_TOKEN
7375
7476
- name: Install dependencies
7577
if: steps.composer-cache.outputs.cache-hit != 'true'
@@ -147,8 +149,10 @@ jobs:
147149
restore-keys: ${{ matrix.os }}-P${{ matrix.php }}-L${{ matrix.laravel }}-composer-
148150

149151
- name: Add token
152+
env:
153+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
150154
run: |
151-
composer config github-oauth.github.com ${{ secrets.GITHUB_TOKEN }}
155+
composer config github-oauth.github.com $GITHUB_TOKEN
152156
153157
- name: Install dependencies
154158
if: steps.composer-cache.outputs.cache-hit != 'true'

.github/workflows/run-tests.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,10 @@ jobs:
7070
restore-keys: ${{ matrix.os }}-PHP${{ matrix.php }}-L${{ matrix.laravel }}-composer-
7171

7272
- name: Add token
73+
env:
74+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7375
run: |
74-
composer config github-oauth.github.com ${{ secrets.GITHUB_TOKEN }}
76+
composer config github-oauth.github.com $GITHUB_TOKEN
7577
7678
- name: Install dependencies
7779
if: steps.composer-cache.outputs.cache-hit != 'true'
@@ -149,8 +151,10 @@ jobs:
149151
restore-keys: ${{ matrix.os }}-PHP${{ matrix.php }}-L${{ matrix.laravel }}-composer-
150152

151153
- name: Add token
154+
env:
155+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
152156
run: |
153-
composer config github-oauth.github.com ${{ secrets.GITHUB_TOKEN }}
157+
composer config github-oauth.github.com $GITHUB_TOKEN
154158
155159
- name: Install dependencies
156160
if: steps.composer-cache.outputs.cache-hit != 'true'

0 commit comments

Comments
 (0)