Skip to content

Commit f488081

Browse files
authored
ci: bring old set-output to build branch and artifact tags (#18923)
1 parent a5f72d2 commit f488081

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

.github/actions/build-branch/action.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ runs:
1919
#
2020
[[ "${{ inputs.branch_version_tag }}" != '' ]] && echo "branch_version_tag=${{ inputs.branch_version_tag }}" >> $GITHUB_OUTPUT \
2121
|| { short_hash=$(git rev-parse --short HEAD); echo "branch_version_tag=dev-$short_hash" >> $GITHUB_OUTPUT ; }
22+
cat $GITHUB_OUTPUT || true # for the sake of investigation
23+
24+
# if the *branch_version_tag* input param is not specified, then generate it as 'dev-<commit_hash>`
25+
#
26+
[[ "${{ inputs.branch_version_tag }}" != '' ]] && echo "::set-output name=branch_version_tag::${{ inputs.branch_version_tag }}" \
27+
|| { short_hash=$(git rev-parse --short HEAD); echo "::set-output name=branch_version_tag::dev-$short_hash"; }
2228
2329
- uses: actions/setup-java@v1
2430
with:

.github/workflows/publish-oss-for-cloud.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,15 @@ jobs:
7272
if $(git merge-base --is-ancestor "${commit_sha}" master); then
7373
echo "master_tag=${commit_sha}" >> $GITHUB_OUTPUT
7474
fi
75+
cat $GITHUB_OUTPUT || true # for the sake of investigation
76+
77+
# set dev_tag
78+
# AirbyteVersion.java allows versions that have a prefix of 'dev'
79+
echo "::set-output name=dev_tag::dev-${commit_sha}"
80+
81+
if $(git merge-base --is-ancestor "${commit_sha}" master); then
82+
echo "::set-output name=master_tag::${commit_sha}"
83+
fi
7584
7685
oss-branch-build:
7786
name: "Gradle Build and Publish"

0 commit comments

Comments
 (0)