Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions .github/workflows/docker-build-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,12 @@ jobs:
id: name
run: |
echo "image_name=$(echo ${{ inputs.image-name }} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_OUTPUT
echo "repository=$(echo ${{ github.repository_owner }} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_OUTPUT
# if pr then actor not repository owner otherwise we can not push to ghcr.io
if [ "${{ github.event_name }}" == "pull_request" ]; then
echo "repository=$(echo ${{ github.actor }}/$(basename ${{ github.repository }}) | tr '[:upper:]' '[:lower:]')" >> $GITHUB_OUTPUT
else
echo "repository=$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_OUTPUT
fi

- name: set PARENT_IMAGE only if specified
id: parent
Expand Down Expand Up @@ -125,7 +130,7 @@ jobs:
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

# build the docker images
Expand Down
Loading