diff --git a/.github/actions/github/action.yml b/.github/actions/github/action.yml index a60dd43..3ebd659 100644 --- a/.github/actions/github/action.yml +++ b/.github/actions/github/action.yml @@ -12,6 +12,9 @@ outputs: action_ref: description: 'The GitHub action repository ref' value: ${{ steps.action.outputs.action_ref }} + action_sha: + description: 'The GitHub action repository sha' + value: ${{ steps.action.outputs.action_sha }} runs: using: 'composite' steps: @@ -22,8 +25,10 @@ runs: 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 + echo "action_sha=" >> $GITHUB_OUTPUT else echo "action_repository=$GITHUB_REPOSITORY" >> $GITHUB_OUTPUT echo "action_ref=$GITHUB_REF" >> $GITHUB_OUTPUT + echo "action_sha=$GITHUB_SHA" >> $GITHUB_OUTPUT fi shell: bash diff --git a/CHANGELOG.md b/CHANGELOG.md index 6915ebf..3259492 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased +## [1.1.6] - 2023-08-04 +### Added +- Expose action_sha from the github action when running directly from the checkout + +### Fixed +- Explicitly disable buildkit when building the docker image to allow referencing merge commits by SHA + ## [1.1.5] - 2023-08-04 ### Fixed - Return ref instead of sha when running .github/actions/github action directly from the checkout diff --git a/action.yml b/action.yml index f80f2fa..20017d0 100644 --- a/action.yml +++ b/action.yml @@ -61,6 +61,7 @@ runs: DOCKERFILE: ${{ inputs.dockerfile }} GITHUB_SERVER_URL: ${{ inputs.github-server-url }} DOCKER_REGISTRY_URL: ${{ inputs.docker-registry-url }} + DOCKER_BUILDKIT: '0' # Using remote git context with buildkit does not support referencing merge commits via SHA run: docker build -t ${DOCKER_REGISTRY_URL#http*://}/$IMAGE:$TAG -f $DOCKERFILE $GITHUB_SERVER_URL/$REPOSITORY.git#$REF shell: bash - id: run