Skip to content

Commit 1c7d9fb

Browse files
authored
Merge pull request #2210 from webknjaz/bugfixes/release-env-context-access
Fix accessing repo id in the release workflow
2 parents 96ed4d2 + 7f9512a commit 1c7d9fb

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

.github/workflows/release.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
name: 📦 Packaging
33

44
on:
5+
pull_request:
56
push:
67
branches:
78
- main
@@ -70,6 +71,11 @@ jobs:
7071

7172
timeout-minutes: 2
7273

74+
outputs:
75+
# NOTE: These aren't env vars because the `${{ env }}` context is
76+
# NOTE: inaccessible when passing inputs to reusable workflows.
77+
upstream-repository-id: ${{ env.UPSTREAM_REPOSITORY_ID }}
78+
7379
steps:
7480
- uses: actions/checkout@v4
7581
with:
@@ -114,7 +120,7 @@ jobs:
114120
- build
115121
if: >-
116122
github.event.action == 'published'
117-
&& env.UPSTREAM_REPOSITORY_ID == github.repository_id
123+
&& needs.build.outputs.upstream-repository-id == github.repository_id
118124
119125
runs-on: ubuntu-latest
120126

changelog.d/2210.packaging.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2149.packaging.md

0 commit comments

Comments
 (0)