This commit is contained in:
Anthony Stirling 2023-05-18 00:03:59 +01:00
parent cbe5b15abd
commit e28e5230d7

View File

@ -46,63 +46,63 @@ jobs:
username: ${{ github.actor }} username: ${{ github.actor }}
password: ${{ github.token }} password: ${{ github.token }}
- name: Generate tags - name: Generate tags
id: meta id: meta
uses: docker/metadata-action@v4.4.0 uses: docker/metadata-action@v4.4.0
with: with:
images: | images: |
${{ secrets.DOCKER_HUB_USERNAME }}/s-pdf ${{ secrets.DOCKER_HUB_USERNAME }}/s-pdf
ghcr.io/${{ github.repository_owner }}/s-pdf ghcr.io/${{ github.repository_owner }}/s-pdf
tags: | tags: |
${{ steps.versionNumber.outputs.versionNumber }} ${{ steps.versionNumber.outputs.versionNumber }}
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/master' }} type=raw,value=latest,enable=${{ github.ref == 'refs/heads/master' }}
- name: Set up QEMU - name: Set up QEMU
uses: docker/setup-qemu-action@v2.1.0 uses: docker/setup-qemu-action@v2.1.0
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2.5.0 uses: docker/setup-buildx-action@v2.5.0
- name: Build and push main Dockerfile - name: Build and push main Dockerfile
uses: docker/build-push-action@v4.0.0 uses: docker/build-push-action@v4.0.0
with: with:
context: . context: .
dockerfile: ./Dockerfile dockerfile: ./Dockerfile
push: true push: true
cache-from: type=gha cache-from: type=gha
cache-to: type=gha,mode=max cache-to: type=gha,mode=max
tags: ${{ steps.meta.outputs.tags }} tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }} labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64,linux/arm64/v8 platforms: linux/amd64,linux/arm64/v8
- name: Build and push Dockerfile-lite - name: Build and push Dockerfile-lite
uses: docker/build-push-action@v4.0.0 uses: docker/build-push-action@v4.0.0
with: with:
context: . context: .
dockerfile: ./Dockerfile-lite dockerfile: ./Dockerfile-lite
push: true push: true
cache-from: type=gha cache-from: type=gha
cache-to: type=gha,mode=max cache-to: type=gha,mode=max
tags: | tags: |
${{ secrets.DOCKER_HUB_USERNAME }}/stirling-pdf-lite:${{ steps.versionNumber.outputs.versionNumber }} ${{ secrets.DOCKER_HUB_USERNAME }}/stirling-pdf-lite:${{ steps.versionNumber.outputs.versionNumber }}
ghcr.io/${{ github.repository_owner }}/stirling-pdf-lite:${{ steps.versionNumber.outputs.versionNumber }} ghcr.io/${{ github.repository_owner }}/stirling-pdf-lite:${{ steps.versionNumber.outputs.versionNumber }}
labels: | labels: |
${{ steps.meta.outputs.labels }} ${{ steps.meta.outputs.labels }}
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/master' }} type=raw,value=latest,enable=${{ github.ref == 'refs/heads/master' }}
type=raw,value=alpha,enable=${{ github.ref == 'refs/heads/main' }} type=raw,value=alpha,enable=${{ github.ref == 'refs/heads/main' }}
- name: Build and push Dockerfile-ultralite - name: Build and push Dockerfile-ultralite
uses: docker/build-push-action@v4.0.0 uses: docker/build-push-action@v4.0.0
with: with:
context: . context: .
dockerfile: ./Dockerfile-ultralite dockerfile: ./Dockerfile-ultralite
push: true push: true
cache-from: type=gha cache-from: type=gha
cache-to: type=gha,mode=max cache-to: type=gha,mode=max
tags: | tags: |
${{ secrets.DOCKER_HUB_USERNAME }}/stirling-pdf-ultralite:${{ steps.versionNumber.outputs.versionNumber }} ${{ secrets.DOCKER_HUB_USERNAME }}/stirling-pdf-ultralite:${{ steps.versionNumber.outputs.versionNumber }}
ghcr.io/${{ github.repository_owner }}/stirling-pdf-ultralite:${{ steps.versionNumber.outputs.versionNumber }} ghcr.io/${{ github.repository_owner }}/stirling-pdf-ultralite:${{ steps.versionNumber.outputs.versionNumber }}
labels: | labels: |
${{ steps.meta.outputs.labels }} ${{ steps.meta.outputs.labels }}
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/master' }} type=raw,value=latest,enable=${{ github.ref == 'refs/heads/master' }}
type=raw,value=alpha,enable=${{ github.ref == 'refs/heads/main' }} type=raw,value=alpha,enable=${{ github.ref == 'refs/heads/main' }}