Skip to content

Commit 2387755

Browse files
Update setup-repo.yml
1 parent 8e389c4 commit 2387755

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

.github/workflows/setup-repo.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- name: Skip setup for template repo
1919
id: check-repo
2020
run: |
21-
if [[ "${GITHUB_REPOSITORY}" == "YourOrg/PESU_Template_TaskManager_P01" ]]; then
21+
if [[ "${GITHUB_REPOSITORY}" == "Testing-Templates/PESU_Template_TaskManager_P01" ]]; then
2222
echo "skip=true" >> "$GITHUB_OUTPUT"
2323
exit 0
2424
else
@@ -38,6 +38,7 @@ jobs:
3838
echo "team=$TEAM" >> "$GITHUB_OUTPUT"
3939
4040
- name: Add topics to repo
41+
if: steps.check-repo.outputs.skip == 'false'
4142
uses: actions/github-script@v7
4243
with:
4344
github-token: ${{ secrets.GH_ADMIN_TOKEN }}
@@ -50,11 +51,16 @@ jobs:
5051
'${{ steps.extract.outputs.section }}'.toLowerCase(),
5152
'${{ steps.extract.outputs.team }}'.toLowerCase()
5253
];
53-
await github.repos.replaceAllTopics({
54+
55+
await github.request('PUT /repos/{owner}/{repo}/topics', {
5456
owner: context.repo.owner,
5557
repo: context.repo.repo,
56-
names: topics
58+
names: topics,
59+
headers: {
60+
accept: 'application/vnd.github.mercy-preview+json'
61+
}
5762
});
5863
5964
- name: Mark setup complete
65+
if: steps.check-repo.outputs.skip == 'false'
6066
run: touch .repo-setup-complete

0 commit comments

Comments
 (0)