Skip to content

Commit

Permalink
Urlencode branch ref in docker build action
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewsavage1 committed Dec 14, 2023
1 parent 495a810 commit 7a7b179
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/actions/docker/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ runs:
env:
REPO: ${{ github.repository }}
if: ${{ (steps.changed-files.outputs.any_changed == 'false') && (github.event_name == 'pull_request') }}
run: echo "DOCKER_TAG=ghcr.io/${REPO}/${{inputs.docker_image}}:${GITHUB_BASE_REF%.1+}" >> $GITHUB_ENV
run: |
ENCODED_REF=$(${GITHUB_BASE_REF%.1+}|jq -sRr @uri)
echo "DOCKER_TAG=ghcr.io/${REPO}/${{inputs.docker_image}}:${ENCODED_REF}" >> $GITHUB_ENV
shell: bash
- name: Set up Cloud SDK
if: ${{ (steps.changed-files.outputs.any_changed == 'true') && (github.event_name == 'pull_request') && (github.event.pull_request.head.repo.fork) }}
Expand Down

0 comments on commit 7a7b179

Please sign in to comment.