forked from opensearch-project/OpenSearch
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use short SHA as Git reference in packages naming (#100)
* Switching to short SHA commit form in package names Signed-off-by: Fede Tux <[email protected]> * Update r_commit_sha.yml Signed-off-by: Federico Gustavo Galland <[email protected]> * Update r_commit_sha.yml Signed-off-by: Álex Ruiz <[email protected]> --------- Signed-off-by: Fede Tux <[email protected]> Signed-off-by: Federico Gustavo Galland <[email protected]> Signed-off-by: Álex Ruiz <[email protected]> Co-authored-by: Fede Tux <[email protected]> Co-authored-by: Álex Ruiz <[email protected]>
- Loading branch information
1 parent
8915776
commit 64ad029
Showing
2 changed files
with
29 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: "Get commit's short SHA (reusable)" | ||
|
||
# This workflow runs when any of the following occur: | ||
# - Run from another workflow | ||
on: | ||
workflow_call: | ||
outputs: | ||
commit_sha: | ||
description: "Returns the short SHA of the latest commit" | ||
value: ${{ jobs.r_commit_sha.outputs.commit_sha }} | ||
|
||
jobs: | ||
r_commit_sha: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
commit_sha: ${{ steps.get_commit_sha.outputs.commit_sha }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Get git commit SHA | ||
id: get_commit_sha | ||
run: | | ||
echo "commit_sha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT |