Skip to content

Commit

Permalink
💚 Add docker hub (#311)
Browse files Browse the repository at this point in the history
  • Loading branch information
tosone authored Feb 20, 2024
1 parent d00659e commit 82c4ac3
Showing 1 changed file with 24 additions and 3 deletions.
27 changes: 24 additions & 3 deletions .github/workflows/image-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,19 @@ jobs:
registry: ghcr.io
username: tosone
password: ${{ secrets.GHCR_TOKEN }}
- name: Login to Docker Hub
uses: docker/login-action@v3
if: ${{ github.event_name != 'pull_request' }}
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: |
ghcr.io/${{ github.repository }}
docker.io/tosone/sigma
tags: |
type=ref,event=pr
type=ref,event=branch,enable=${{ github.ref != 'refs/heads/main' }}
Expand All @@ -67,7 +74,7 @@ jobs:
labels: ${{ steps.meta.outputs.labels }}
provenance: false
sbom: false
outputs: oci-mediatypes=true,compression=zstd,compression-level=12,force-compression=true,type=image
outputs: oci-mediatypes=true,compression=zstd,compression-level=19,force-compression=true,type=image
image-build-debian:
name: image-build-debian
runs-on: ubuntu-22.04
Expand Down Expand Up @@ -96,12 +103,19 @@ jobs:
registry: ghcr.io
username: tosone
password: ${{ secrets.GHCR_TOKEN }}
- name: Login to Docker Hub
uses: docker/login-action@v3
if: ${{ github.event_name != 'pull_request' }}
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: |
ghcr.io/${{ github.repository }}
docker.io/tosone/sigma
flavor: |
latest=false
tags: |
Expand All @@ -122,7 +136,7 @@ jobs:
labels: ${{ steps.meta.outputs.labels }}
provenance: false
sbom: false
outputs: oci-mediatypes=true,compression=zstd,compression-level=12,force-compression=true,type=image
outputs: oci-mediatypes=true,compression=zstd,compression-level=19,force-compression=true,type=image
image-build-builder:
name: image-build-builder
runs-on: ubuntu-22.04
Expand Down Expand Up @@ -151,12 +165,19 @@ jobs:
registry: ghcr.io
username: tosone
password: ${{ secrets.GHCR_TOKEN }}
- name: Login to Docker Hub
uses: docker/login-action@v3
if: ${{ github.event_name != 'pull_request' }}
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: |
ghcr.io/${{ github.repository }}-builder
docker.io/tosone/sigma-builder
tags: |
type=ref,event=pr
type=ref,event=branch,enable=${{ github.ref != 'refs/heads/main' }}
Expand All @@ -175,4 +196,4 @@ jobs:
labels: ${{ steps.meta.outputs.labels }}
provenance: false
sbom: false
outputs: oci-mediatypes=true,compression=zstd,compression-level=12,force-compression=true,type=image
outputs: oci-mediatypes=true,compression=zstd,compression-level=19,force-compression=true,type=image

0 comments on commit 82c4ac3

Please sign in to comment.