Skip to content

Commit c7cafb3

Browse files
Update build-and-publish.yml
1 parent 2f7da1f commit c7cafb3

1 file changed

Lines changed: 1 addition & 67 deletions

File tree

.github/workflows/build-and-publish.yml

Lines changed: 1 addition & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -253,72 +253,6 @@ jobs:
253253
ghcr.io/${{ github.repository_owner }}/bentopdf${{ matrix.mode.suffix }}:edge-amd64 \
254254
ghcr.io/${{ github.repository_owner }}/bentopdf${{ matrix.mode.suffix }}:edge-arm64
255255
256-
# Copy images from GHCR to DockerHub
257-
push-to-dockerhub:
258-
runs-on: ubuntu-latest
259-
needs: [merge-manifests-ghcr]
260-
continue-on-error: true
261-
permissions:
262-
contents: read
263-
packages: read
264-
strategy:
265-
matrix:
266-
mode:
267-
- name: default
268-
suffix: ""
269-
- name: simple
270-
suffix: "-simple"
271-
steps:
272-
- name: Login to GitHub Container Registry
273-
uses: docker/login-action@v3
274-
with:
275-
registry: ghcr.io
276-
username: ${{ github.repository_owner }}
277-
password: ${{ secrets.GITHUB_TOKEN }}
278-
279-
- name: Login to DockerHub
280-
uses: docker/login-action@v3
281-
with:
282-
username: ${{ secrets.DOCKER_USERNAME }}
283-
password: ${{ secrets.DOCKER_TOKEN }}
284-
285-
- name: Extract version
286-
id: version
287-
run: |
288-
if [[ $GITHUB_REF == refs/tags/v* ]]; then
289-
VERSION=${GITHUB_REF#refs/tags/}
290-
echo "version=${VERSION}" >> $GITHUB_OUTPUT
291-
echo "version_without_v=${VERSION#v}" >> $GITHUB_OUTPUT
292-
echo "is_release=true" >> $GITHUB_OUTPUT
293-
else
294-
SHORT_SHA=${GITHUB_SHA::7}
295-
echo "version=edge" >> $GITHUB_OUTPUT
296-
echo "short_sha=${SHORT_SHA}" >> $GITHUB_OUTPUT
297-
echo "is_release=false" >> $GITHUB_OUTPUT
298-
fi
299-
300-
- name: Copy images to DockerHub (release)
301-
if: steps.version.outputs.is_release == 'true'
302-
run: |
303-
docker buildx imagetools create -t bentopdfteam/bentopdf${{ matrix.mode.suffix }}:latest \
304-
ghcr.io/${{ github.repository_owner }}/bentopdf${{ matrix.mode.suffix }}:${{ steps.version.outputs.version }}-amd64 \
305-
ghcr.io/${{ github.repository_owner }}/bentopdf${{ matrix.mode.suffix }}:${{ steps.version.outputs.version }}-arm64
306-
307-
docker buildx imagetools create -t bentopdfteam/bentopdf${{ matrix.mode.suffix }}:${{ steps.version.outputs.version }} \
308-
ghcr.io/${{ github.repository_owner }}/bentopdf${{ matrix.mode.suffix }}:${{ steps.version.outputs.version }}-amd64 \
309-
ghcr.io/${{ github.repository_owner }}/bentopdf${{ matrix.mode.suffix }}:${{ steps.version.outputs.version }}-arm64
310-
311-
docker buildx imagetools create -t bentopdfteam/bentopdf${{ matrix.mode.suffix }}:${{ steps.version.outputs.version_without_v }} \
312-
ghcr.io/${{ github.repository_owner }}/bentopdf${{ matrix.mode.suffix }}:${{ steps.version.outputs.version }}-amd64 \
313-
ghcr.io/${{ github.repository_owner }}/bentopdf${{ matrix.mode.suffix }}:${{ steps.version.outputs.version }}-arm64
314-
315-
- name: Copy images to DockerHub (edge)
316-
if: steps.version.outputs.is_release == 'false'
317-
run: |
318-
docker buildx imagetools create -t bentopdfteam/bentopdf${{ matrix.mode.suffix }}:edge \
319-
ghcr.io/${{ github.repository_owner }}/bentopdf${{ matrix.mode.suffix }}:edge-amd64 \
320-
ghcr.io/${{ github.repository_owner }}/bentopdf${{ matrix.mode.suffix }}:edge-arm64
321-
322-
docker buildx imagetools create -t bentopdfteam/bentopdf${{ matrix.mode.suffix }}:sha-${{ steps.version.outputs.short_sha }} \
256+
323257
ghcr.io/${{ github.repository_owner }}/bentopdf${{ matrix.mode.suffix }}:edge-amd64 \
324258
ghcr.io/${{ github.repository_owner }}/bentopdf${{ matrix.mode.suffix }}:edge-arm64

0 commit comments

Comments
 (0)