Skip to content

Commit e816b47

Browse files
committed
ci: return 7 symbols short git hash on branch build
1 parent b92c961 commit e816b47

File tree

2 files changed

+2
-16
lines changed

2 files changed

+2
-16
lines changed

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

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,7 @@ runs:
1818
# if the *branch_version_tag* input param is not specified, then generate it as 'dev-<commit_hash>`
1919
#
2020
[[ "${{ inputs.branch_version_tag }}" != '' ]] && echo "branch_version_tag=${{ inputs.branch_version_tag }}" >> $GITHUB_OUTPUT \
21-
|| { 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"; }
21+
|| { short_hash=$(git rev-parse --short=7 HEAD); echo "branch_version_tag=dev-$short_hash" >> $GITHUB_OUTPUT ; }
2822
2923
- uses: actions/setup-java@v1
3024
with:

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

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ jobs:
6262
run: |-
6363
set -x
6464
65-
commit_sha=$(git rev-parse --short HEAD)
65+
commit_sha=$(git rev-parse --short=7 HEAD)
6666
6767
# set dev_tag
6868
# AirbyteVersion.java allows versions that have a prefix of 'dev'
@@ -74,14 +74,6 @@ jobs:
7474
fi
7575
cat $GITHUB_OUTPUT || true # for the sake of investigation
7676
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
84-
8577
oss-branch-build:
8678
name: "Gradle Build and Publish"
8779
needs:

0 commit comments

Comments
 (0)