Skip to content

Commit 8dcc6f8

Browse files
fix: Only release to local repo
1 parent 31b0b85 commit 8dcc6f8

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

.github/workflows/release.yaml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ on:
2020

2121
jobs:
2222
release:
23-
if: ${{ !contains(github.event.head_commit.message, '[skip ci]') }}
23+
if: ${{ !contains(github.event.head_commit.message, '[skip ci]') && github.repository == 'ITV/kics-github-action' }}
2424
runs-on: ubuntu-latest
2525
permissions:
2626
contents: write
@@ -33,6 +33,16 @@ jobs:
3333
released: ${{ steps.semantic.outputs.new_release_published }}
3434

3535
steps:
36+
- name: Verify repository
37+
run: |
38+
echo "Running release for repository: ${{ github.repository }}"
39+
if [[ "${{ github.repository }}" != "ITV/kics-github-action" ]]; then
40+
echo "❌ Error: This release workflow should only run on ITV/kics-github-action"
41+
echo "Current repository: ${{ github.repository }}"
42+
exit 1
43+
fi
44+
echo "✅ Repository verification passed"
45+
3646
- name: Checkout
3747
uses: actions/checkout@v4
3848
with:
@@ -80,8 +90,9 @@ jobs:
8090
echo "new_release_version=$NEW_VERSION" >> $GITHUB_OUTPUT
8191
echo "new_release_published=true" >> $GITHUB_OUTPUT
8292
83-
# Create the release
93+
# Create the release in ITV/kics-github-action repository
8494
gh release create "v$NEW_VERSION" \
95+
--repo "ITV/kics-github-action" \
8596
--title "Release v$NEW_VERSION" \
8697
--notes "Manual release: ${{ github.event.inputs.version_type }} version bump" \
8798
--target main

.releaserc.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"repositoryUrl": "https://github.com/ITV/kics-github-action.git",
23
"branches": [
34
"main",
45
"master"
@@ -9,7 +10,8 @@
910
[
1011
"@semantic-release/github",
1112
{
12-
"assets": []
13+
"assets": [],
14+
"releasedLabels": false
1315
}
1416
]
1517
]

0 commit comments

Comments
 (0)