Skip to content

Commit

Permalink
fix: return ref instead of sha from the github action
Browse files Browse the repository at this point in the history
  • Loading branch information
galargh committed Aug 4, 2023
1 parent 905bdf9 commit 108757a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 1 addition & 3 deletions .github/actions/github/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,12 @@ runs:
- id: action
env:
ACTION_PATH: ${{ fromJSON(inputs.github).action_path }}
REPOSITORY: ${{ fromJSON(inputs.github).repository }}
SHA: ${{ fromJSON(inputs.github).sha }}
run: |
if [[ $ACTION_PATH == */_actions/* ]]; then
echo "action_repository=$(echo ${ACTION_PATH#*/_actions/} | cut -d/ -f1-2)" >> $GITHUB_OUTPUT
echo "action_ref=$(echo ${ACTION_PATH#*/_actions/} | cut -d/ -f3)" >> $GITHUB_OUTPUT
else
echo "action_repository=$GITHUB_REPOSITORY" >> $GITHUB_OUTPUT
echo "action_ref=$GITHUB_SHA" >> $GITHUB_OUTPUT
echo "action_ref=$GITHUB_REF" >> $GITHUB_OUTPUT
fi
shell: bash
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## Unreleased

## [1.1.5] - 2023-08-04
### Fixed
- Return ref instead of sha when running .github/actions/github action directly from the checkout

## [1.1.4] - 2023-03-10
### Fixed
- Correctly validate if docker pull was successful
Expand Down

0 comments on commit 108757a

Please sign in to comment.