Skip to content

Commit 524f479

Browse files
committed
After review 0
1 parent 4a4ddfd commit 524f479

1 file changed

Lines changed: 15 additions & 4 deletions

File tree

.github/workflows/front-docs.yml

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
name: Update phplist-web-frontend OpenAPI
22

3+
permissions:
4+
contents: write # Required to push to web-frontend repo
5+
actions: read # Required to download artifacts
6+
37
on:
48
push:
59
branches:
@@ -15,16 +19,22 @@ jobs:
1519
source_branch: ${{ steps.branch.outputs.source_branch }}
1620
steps:
1721
- name: Determine source branch
22+
env:
23+
EVENT_NAME: ${{ github.event_name }}
24+
HEAD_REF: ${{ github.head_ref }}
25+
REF_NAME: ${{ github.ref_name }}
1826
id: branch
1927
run: |
20-
if [ "${{ github.event_name }}" = "pull_request" ]; then
21-
echo "source_branch=${{ github.head_ref }}" >> "$GITHUB_OUTPUT"
28+
if [ "$EVENT_NAME" = "pull_request" ]; then
29+
echo "source_branch=$HEAD_REF" >> "$GITHUB_OUTPUT"
2230
else
23-
echo "source_branch=${{ github.ref_name }}" >> "$GITHUB_OUTPUT"
31+
echo "source_branch=$REF_NAME" >> "$GITHUB_OUTPUT"
2432
fi
2533
2634
- name: Checkout Source Repository
27-
uses: actions/checkout@v3
35+
uses: actions/checkout@v4
36+
with:
37+
persist-credentials: false
2838

2939
- name: Setup PHP with Composer and Extensions
3040
uses: shivammathur/setup-php@v2
@@ -64,6 +74,7 @@ jobs:
6474
repository: phpList/web-frontend
6575
token: ${{ secrets.PUSH_WEB_FRONTEND }}
6676
fetch-depth: 0
77+
persist-credentials: false
6778

6879
- name: Prepare target branch
6980
run: |

0 commit comments

Comments
 (0)