Skip to content

Commit dfb9f58

Browse files
committed
ci: integrate sync-docs workflow
Signed-off-by: Emilien Escalle <[email protected]>
1 parent 3c682e4 commit dfb9f58

File tree

1 file changed

+37
-10
lines changed

1 file changed

+37
-10
lines changed

.github/workflows/__main-ci.yml

Lines changed: 37 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,7 @@ on: # yamllint disable-line rule:truthy
1111
schedule:
1212
- cron: "25 8 * * 1"
1313

14-
permissions:
15-
actions: write
16-
contents: write
17-
issues: read
18-
packages: write
19-
pages: write
20-
pull-requests: write
21-
security-events: write
22-
statuses: write
23-
id-token: write
14+
permissions: {}
2415

2516
concurrency:
2617
group: ${{ github.workflow }}-${{ github.ref }}
@@ -29,11 +20,25 @@ concurrency:
2920
jobs:
3021
ci:
3122
uses: ./.github/workflows/__shared-ci.yml
23+
permissions:
24+
actions: read
25+
contents: read
26+
issues: read
27+
packages: write
28+
pull-requests: read
29+
security-events: write
30+
statuses: write
31+
id-token: write
3232
secrets: inherit
3333

3434
clean:
3535
needs: ci
3636
uses: ./.github/workflows/prune-pull-requests-images-tags.yml
37+
permissions:
38+
contents: read
39+
pull-requests: read
40+
packages: write
41+
id-token: write
3742
with:
3843
images: |
3944
[
@@ -46,6 +51,11 @@ jobs:
4651
clean-with-cache:
4752
needs: ci
4853
uses: ./.github/workflows/prune-pull-requests-images-tags.yml
54+
permissions:
55+
contents: read
56+
pull-requests: read
57+
packages: write
58+
id-token: write
4959
with:
5060
prune-cache-images: true
5161
images: |
@@ -58,6 +68,9 @@ jobs:
5868
needs: ci
5969
if: github.event_name != 'schedule'
6070
runs-on: ubuntu-latest
71+
permissions:
72+
contents: write
73+
pull-requests: write
6174
steps:
6275
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
6376

@@ -71,8 +84,22 @@ jobs:
7184
needs: ci
7285
if: github.event_name != 'schedule'
7386
uses: hoverkraft-tech/ci-github-publish/.github/workflows/release-actions.yml@0717eb404857b7e4a15dc0db5fbece52921e85fb # 0.13.1
87+
permissions:
88+
contents: read
7489
with:
7590
update-all: ${{ (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')) || github.event_name == 'workflow_dispatch' }}
7691
github-app-id: ${{ vars.CI_BOT_APP_ID }}
7792
secrets:
7893
github-app-key: ${{ secrets.CI_BOT_APP_PRIVATE_KEY }}
94+
95+
sync-docs:
96+
needs: release
97+
if: github.event_name != 'schedule' && github.ref_name == github.event.repository.default_branch && needs.release.outputs.artifact-id
98+
uses: hoverkraft-tech/public-docs/.github/workflows/sync-docs-dispatcher.yml@c40c17f7d6a8090950b3ef4bfc70502707a6bb9f # 0.3.0
99+
permissions:
100+
contents: read
101+
with:
102+
artifact-id: ${{ needs.release.outputs.artifact-id }}
103+
github-app-id: ${{ vars.CI_BOT_APP_ID }}
104+
secrets:
105+
github-app-key: ${{ secrets.CI_BOT_APP_PRIVATE_KEY }}

0 commit comments

Comments
 (0)