Skip to content

Commit

Permalink
ci: return 7 symbols short git hash on branch build (#18934)
Browse files Browse the repository at this point in the history
  • Loading branch information
cuyk authored Nov 3, 2022
1 parent c40f1b6 commit afde9c6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 16 deletions.
8 changes: 1 addition & 7 deletions .github/actions/build-branch/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,7 @@ runs:
# if the *branch_version_tag* input param is not specified, then generate it as 'dev-<commit_hash>`
#
[[ "${{ inputs.branch_version_tag }}" != '' ]] && echo "branch_version_tag=${{ inputs.branch_version_tag }}" >> $GITHUB_OUTPUT \
|| { short_hash=$(git rev-parse --short HEAD); echo "branch_version_tag=dev-$short_hash" >> $GITHUB_OUTPUT ; }
cat $GITHUB_OUTPUT || true # for the sake of investigation
# if the *branch_version_tag* input param is not specified, then generate it as 'dev-<commit_hash>`
#
[[ "${{ inputs.branch_version_tag }}" != '' ]] && echo "::set-output name=branch_version_tag::${{ inputs.branch_version_tag }}" \
|| { short_hash=$(git rev-parse --short HEAD); echo "::set-output name=branch_version_tag::dev-$short_hash"; }
|| { short_hash=$(git rev-parse --short=7 HEAD); echo "branch_version_tag=dev-$short_hash" >> $GITHUB_OUTPUT ; }
- uses: actions/setup-java@v1
with:
Expand Down
10 changes: 1 addition & 9 deletions .github/workflows/publish-oss-for-cloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
run: |-
set -x
commit_sha=$(git rev-parse --short HEAD)
commit_sha=$(git rev-parse --short=7 HEAD)
# set dev_tag
# AirbyteVersion.java allows versions that have a prefix of 'dev'
Expand All @@ -74,14 +74,6 @@ jobs:
fi
cat $GITHUB_OUTPUT || true # for the sake of investigation
# set dev_tag
# AirbyteVersion.java allows versions that have a prefix of 'dev'
echo "::set-output name=dev_tag::dev-${commit_sha}"
if $(git merge-base --is-ancestor "${commit_sha}" master); then
echo "::set-output name=master_tag::${commit_sha}"
fi
oss-branch-build:
name: "Gradle Build and Publish"
needs:
Expand Down

0 comments on commit afde9c6

Please sign in to comment.