Skip to content

Commit 0259ba6

Browse files
Fixed: chore workflow
1 parent c82f592 commit 0259ba6

File tree

3 files changed

+26
-9
lines changed

3 files changed

+26
-9
lines changed

.github/workflows/chore.yml

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,26 +16,31 @@ jobs:
1616
runs-on: ubuntu-latest
1717

1818
steps:
19+
- name: Get Gitflow App token
20+
uses: actions/create-github-app-token@v1
21+
id: app-token
22+
with:
23+
app-id: ${{ secrets.GITFLOW_APP_ID }}
24+
private-key: ${{ secrets.GITFLOW_APP_KEY }}
25+
1926
- name: Checkout Repository
2027
uses: actions/checkout@v4
28+
with:
29+
token: ${{ steps.app-token.outputs.token }}
2130

2231
- name: Merge Source Branch into Develop
2332
run: |
2433
git config --global user.name "bot"
2534
git config --global user.email "[email protected]"
26-
git fetch
27-
git checkout develop
35+
git fetch origin
36+
git switch develop
2837
git merge --no-ff origin/${{ github.event.pull_request.head.ref }} -m "Merge ${{ github.event.pull_request.head.ref }} into develop"
2938
git push origin develop
3039
31-
- name: Build docs
32-
if: startsWith(github.event.pull_request.head.ref, 'docs/')
33-
run: foo
34-
3540
publish-docs:
36-
name: Publish Documentation
41+
name: Publish documentation
3742
runs-on: ubuntu-latest
38-
if: startsWith(github.event.pull_request.head.ref, 'docs/')
43+
if: startsWith(github.event.pull_request.head.ref, 'docs/') || startsWith(github.event.pull_request.head.ref, 'release/')
3944
permissions:
4045
id-token: write
4146
pages: write
@@ -66,3 +71,6 @@ jobs:
6671

6772
- name: Deploy pages
6873
uses: actions/deploy-pages@v4
74+
75+
permissions:
76+
contents: write

.github/workflows/pull.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
pull_request:
55
branches:
66
- 'develop'
7+
- 'main'
78

89
jobs:
910
run-tests:

.github/workflows/release.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,14 @@ jobs:
2525
(github.event.pull_request.merged == true &&
2626
startsWith(github.event.pull_request.head.ref, 'release/'))
2727
steps:
28+
29+
- name: Get Gitflow App token
30+
uses: actions/create-github-app-token@v1
31+
id: app-token
32+
with:
33+
app-id: ${{ secrets.GITFLOW_APP_ID }}
34+
private-key: ${{ secrets.GITFLOW_APP_KEY }}
35+
2836
- name: Gitflow action
2937
id: gitflow-action
3038
uses: hoangvvo/[email protected]
@@ -35,7 +43,7 @@ jobs:
3543
version_increment: ${{ contains(github.head_ref, 'hotfix/') && 'patch' || '' }}
3644
dry_run: ${{ inputs.dry_run }}
3745
env:
38-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
46+
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
3947

4048
- name: Checkout code
4149
uses: actions/checkout@v4

0 commit comments

Comments
 (0)