Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Update git command in build docker image workflow #278

Merged
merged 2 commits into from
Aug 22, 2024
Merged

Conversation

amishas157
Copy link
Contributor

@amishas157 amishas157 commented Aug 21, 2024

PR Checklist

PR Structure

  • This PR has reasonably narrow scope (if not, break it down into smaller PRs).
  • This PR avoids mixing refactoring changes with feature changes (split into two PRs
    otherwise).
  • This PR's title starts with the jira ticket associated with the PR.

Thoroughness

  • This PR adds tests for the most critical parts of the new functionality or fixes.
  • I've updated the README with the added features, breaking changes, new instructions on how to use the repository. I updated the description of the fuction with the changes that were made.

Release planning

  • I've decided if this PR requires a new major/minor/patch version accordingly to
    semver, and I've changed the name of the BRANCH to release/_ , feature/_ or patch/* .

What

This PR updates the git command to extract sha.
${{ github.event.pull_request.head.sha }} works well when we have a pull request and the workflow is triggered on commit push.
However, for running workflow manually, HEAD helps to extract sha

Why

Currently the build docker image is failing, since that was tested with trigger workflow on commit push

Known limitations

None

@amishas157 amishas157 marked this pull request as ready for review August 22, 2024 17:27
@amishas157 amishas157 requested a review from a team as a code owner August 22, 2024 17:27
@amishas157 amishas157 changed the title empty Update git command in build docker image workflo Aug 22, 2024
@amishas157 amishas157 changed the title Update git command in build docker image workflo Update git command in build docker image workflow Aug 22, 2024
@@ -17,7 +17,7 @@ jobs:

- name: Add SHORT_SHA env property with commit short sha
run: |
SHORT_SHA=$(git rev-parse --short=9 ${{ github.event.pull_request.head.sha }})
SHORT_SHA=$(git rev-parse --short=9 HEAD)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just confirming; This is the HEAD of the selected branch right like test-gh-actions or master?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will be HEAD of selected branch.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@amishas157 amishas157 merged commit 0c9afe9 into master Aug 22, 2024
9 checks passed
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants