Skip to content

Commit b519d6d

Browse files
committed
test
1 parent 1cc3eaf commit b519d6d

File tree

2 files changed

+6
-18
lines changed

2 files changed

+6
-18
lines changed

.github/actions/switch-context/action.yml

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,6 @@ inputs:
33
context-name:
44
description: 'Context name to switch to'
55
required: true
6-
outputs:
7-
python-version:
8-
description: 'Python version'
9-
value: string
10-
initial-commit-sha:
11-
description: 'Initial commit sha for calculating changelog diffs'
12-
value: string
13-
initial-version:
14-
description: 'Initial version to release if no tag exists yet'
15-
value: string
166
runs:
177
using: "composite"
188
steps:
@@ -23,8 +13,6 @@ runs:
2313
cp scripts/dev/contexts/gha-private-context scripts/dev/contexts/private-context
2414
scripts/dev/switch_context.sh ${{inputs.context-name}}
2515
echo "Finished initializing to the ${{inputs.context-name}}"
26-
source .generated/context.env
27-
printenv
28-
echo "python-version=$(echo ${PYTHON_VERSION})" | tee $GITHUB_OUTPUT
29-
echo "initial-commit-sha=$(echo ${INITIAL_COMMIT_SHA})" | tee $GITHUB_OUTPUT
30-
echo "initial-version=$(echo ${INITIAL_VERSION})" | tee $GITHUB_OUTPUT
16+
while read line; do
17+
echo "$line" >> $GITHUB_ENV
18+
done < .generated/context.env

.github/workflows/preview_release_notes.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@ jobs:
2929
- name: Setup host
3030
uses: ./.github/actions/setup-ubuntu-host
3131
with:
32-
python-version: '${{ steps.switch_context.outputs.python-version }}'
32+
python-version: '${{ env.PYTHON_VERSION }}'
3333
- name: Generate Release Notes
3434
run: python -m scripts.release.release_notes -s $INITIAL_COMMIT_SHA -v $INITIAL_VERSION -o release_notes_tmp.md
3535
env:
3636
# We can not use environments set via GitHub UI because they will
3737
# not be available in the pull requests running from forks.
38-
INITIAL_COMMIT_SHA: '${{ steps.switch_context.outputs.initial-commit-sha }}'
39-
INITIAL_VERSION: '${{ steps.switch_context.outputs.initial-version}}'
38+
INITIAL_COMMIT_SHA: '${{ env.INITIAL_COMMIT_SHA }}'
39+
INITIAL_VERSION: '${{ env.INITIAL_VERSION }}'
4040
- name: Add disclaimer to release notes preview
4141
run: |
4242
echo -e "_:warning: (this preview might not be accurate if the PR is not rebased on current master branch)_\n" > release_notes_preview.md

0 commit comments

Comments
 (0)