Skip to content

Commit afc7d49

Browse files
thejcannonhuonw
andauthored
Trigger docs sync at the end of a release (#20436)
This change makes it so after a release is published we trigger docs sync. --------- Co-authored-by: Huon Wilson <[email protected]>
1 parent e7b4b25 commit afc7d49

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

.github/workflows/release.yaml

+12
Original file line numberDiff line numberDiff line change
@@ -437,6 +437,18 @@ jobs:
437437
run: 'gh api -X POST "/repos/pantsbuild/wheels.pantsbuild.org/dispatches" -F
438438
event_type=github-pages
439439
440+
'
441+
- env:
442+
GH_TOKEN: ${{ secrets.WORKER_PANTS_PANTSBUILD_ORG_TRIGGER_PAT }}
443+
if: needs.release_info.outputs.is-release == 'true'
444+
name: Trigger docs sync
445+
run: 'RELEASE_TAG=${{ steps.get_info.outputs.build-ref }}
446+
447+
RELEASE_VERSION="${RELEASE_TAG#release_}"
448+
449+
gh workflow run sync_docs.yml -F "version=$RELEASE_VERSION" -F "reviewer=${{
450+
github.actor }}" -R pantsbuild/pantsbuild.org
451+
440452
'
441453
release_info:
442454
if: github.repository_owner == 'pantsbuild'

src/python/pants_release/generate_github_workflows.py

+14
Original file line numberDiff line numberDiff line change
@@ -1259,6 +1259,20 @@ def release_jobs_and_inputs() -> tuple[Jobs, dict[str, Any]]:
12591259
"""
12601260
),
12611261
},
1262+
{
1263+
"name": "Trigger docs sync",
1264+
"if": "needs.release_info.outputs.is-release == 'true'",
1265+
"env": {
1266+
"GH_TOKEN": "${{ secrets.WORKER_PANTS_PANTSBUILD_ORG_TRIGGER_PAT }}",
1267+
},
1268+
"run": dedent(
1269+
"""\
1270+
RELEASE_TAG=${{ steps.get_info.outputs.build-ref }}
1271+
RELEASE_VERSION="${RELEASE_TAG#release_}"
1272+
gh workflow run sync_docs.yml -F "version=$RELEASE_VERSION" -F "reviewer=${{ github.actor }}" -R pantsbuild/pantsbuild.org
1273+
"""
1274+
),
1275+
},
12621276
],
12631277
},
12641278
}

0 commit comments

Comments
 (0)