Skip to content

Commit

Permalink
ci: replace GITHUB_OUTPUT with GITHUB_ENV on multiline variables (air…
Browse files Browse the repository at this point in the history
…bytehq#18809)

* ci: replace GITHUB_OUTPUT with GITHUB_ENV on multiline variables

* ci: replace github set-ouput with new syntax in ./tools/bin/
  • Loading branch information
cuyk authored and drewrasm committed Nov 2, 2022
1 parent f16f643 commit 7de1353
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 10 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/publish-helm-charts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,10 @@ jobs:
id: changelog
run: |
cd ./airbyte/
echo "::set-output name=changelog::$(PAGER=cat git log $(git describe --tags --match "*-helm" $(git rev-list --tags --max-count=1))..HEAD --oneline --decorate=no)"
changelog=$(PAGER=cat git log $(git describe --tags --match "*-helm" $(git rev-list --tags --max-count=1))..HEAD --oneline --decorate=no)
echo "changelog<<EOF" >> $GITHUB_ENV
echo "$changelog" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
Expand All @@ -122,7 +125,7 @@ jobs:
## What
Bump version reference in all Chart.yaml files to ${{ needs.generate-semantic-version.outputs.next-version }}
CHANGELOG:
${{ steps.changelog.outputs.changelog }}
${{ env.changelog }}
commit-message: Bump helm chart version reference to ${{ needs.generate-semantic-version.outputs.next-version }}
delete-branch: true

Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/release-airbyte-os.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,9 @@ jobs:
run: |
chmod +x tools/bin/pr_body.sh
body=$(./tools/bin/pr_body.sh)
body="${body//$'\n'/'%0A'}"
echo PR_BODY=$body >> $GITHUB_OUTPUT
echo "PR_BODY<<EOF" >> $GITHUB_ENV
echo "$body" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v3
Expand All @@ -146,7 +147,7 @@ jobs:
branch-suffix: random
delete-branch: true
title: Bump Airbyte version from ${{ steps.bump_version.outputs.PREV_VERSION }} to ${{ steps.bump_version.outputs.NEW_VERSION }}
body: ${{ steps.pr_body.outputs.PR_BODY }}
body: ${{ env.PR_BODY }}
commit-message: Bump Airbyte version from ${{ steps.bump_version.outputs.PREV_VERSION }} to ${{ steps.bump_version.outputs.NEW_VERSION }}
- name: PR Details
run: |
Expand Down
6 changes: 3 additions & 3 deletions tools/bin/bump_version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ export VERSION=$NEW_VERSION # for safety, since lib.sh exports a VERSION that is

set +o xtrace
echo "Bumped version from ${PREV_VERSION} to ${NEW_VERSION}"
echo ::set-output name=PREV_VERSION::${PREV_VERSION}
echo ::set-output name=NEW_VERSION::${NEW_VERSION}
echo ::set-output name=GIT_REVISION::${GIT_REVISION}
echo "PREV_VERSION=${PREV_VERSION}" >> $GITHUB_OUTPUT
echo "NEW_VERSION=${NEW_VERSION}" >> $GITHUB_OUTPUT
echo "GIT_REVISION=${GIT_REVISION}" >> $GITHUB_OUTPUT
4 changes: 2 additions & 2 deletions tools/bin/find_non_rate_limited_PAT
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ for personal_access_token in $@
# github actions will NOT pass a string that looks like a secret
base64_valid_pat=$(echo "$personal_access_token" | base64)
echo -e "$blue_text""Found a good PAT!!""$default_text"
# ::set-output name is a github action magic string for output
echo "::set-output name=pat::$base64_valid_pat"
# $GITHUB_OUTPUT is a github action magic env variable for output
echo "pat=$base64_valid_pat" >> $GITHUB_OUTPUT
echo "PAT=$personal_access_token" >> $GITHUB_ENV
exit 0
else
Expand Down

0 comments on commit 7de1353

Please sign in to comment.