Skip to content

Commit 5d58a8a

Browse files
fix: use environment to pass data to the script (#1922)
Signed-off-by: matttrach <matt.trachier@suse.com> Co-authored-by: Matt Trachier <matt.trachier@suse.com>
1 parent c28e049 commit 5d58a8a

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

.github/workflows/release.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -403,6 +403,8 @@ jobs:
403403
env:
404404
TAG: ${{ env.RC_TAG }}
405405
BRANCH: ${{ env.RC_BRANCH }}
406+
OWNER: ${{ github.repository_owner }}
407+
REPO: ${{ github.event.repository.name }}
406408
with:
407409
script: |
408410
const scriptPath = `${{ github.workspace }}/.github/workflows/scripts/rc-notify.js`;

.github/workflows/scripts/rc-notify.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
export default async ({ github, process }) => {
22
const tagName = process.env.TAG;
33
const branchLabel = process.env.BRANCH;
4-
const owner = github.repo.owner;
5-
const repo = github.repo.repo;
4+
const owner = process.env.OWNER;
5+
const repo = process.env.REPO;
66

77
if (!tagName.toLowerCase().includes('rc')) {
88
console.log(`Tag "${tagName}" does not appear to be an RC. Skipping notification.`);

0 commit comments

Comments
 (0)