File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -42,14 +42,15 @@ jobs:
4242 if : github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
4343 run : |
4444 REPO=ghcr.io/${{ github.repository }}
45+ DOCKERHUB_REPO=shioriapp/shiori
4546 TAG=$(git describe --tags)
4647 if [[ "$TAG" == *"rc"* ]]
4748 then
4849 TAG2="dev"
4950 else
5051 TAG2="latest"
5152 fi
52- echo "tag_flags=--tag $REPO:${{ inputs.tag_prefix }}$TAG --tag $REPO:${{ inputs.tag_prefix }}$TAG2" >> $GITHUB_ENV
53+ echo "tag_flags=--tag $REPO:${{ inputs.tag_prefix }}$TAG --tag $REPO:${{ inputs.tag_prefix }}$TAG2 --tag $DOCKERHUB_REPO:${{ inputs.tag_prefix }}$TAG --tag $DOCKERHUB_REPO:${{ inputs.tag_prefix }}$TAG2 " >> $GITHUB_ENV
5354
5455 # Every pull request
5556 - name : Prepare pull request tags
6364 run : |
6465 set -x
6566 echo "${{ secrets.GITHUB_TOKEN }}" | docker login -u "${{ github.repository_owner }}" --password-stdin ghcr.io
67+ # Login to DockerHub for versioned releases
68+ if [[ "${{ github.event_name }}" == "push" && "${{ github.ref }}" == refs/tags/v* ]]; then
69+ echo "${{ secrets.DOCKERHUB_TOKEN }}" | docker login -u "${{ secrets.DOCKERHUB_USERNAME }}" --password-stdin
70+ fi
6671 make buildx CONTAINERFILE_NAME=${{ inputs.dockerfile }} CONTAINER_BUILDX_OPTIONS="--push ${{ env.tag_flags }}"
You can’t perform that action at this time.
0 commit comments