Skip to content

Commit

Permalink
Enable Docker Hub
Browse files Browse the repository at this point in the history
  • Loading branch information
MarekSuchanek authored Apr 11, 2024
1 parent ad7960f commit aff4cfc
Showing 1 changed file with 29 additions and 29 deletions.
58 changes: 29 additions & 29 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,34 +79,34 @@ jobs:
labels: ${{ steps.meta-private.outputs.labels }}

# (5) -> Docker [Docker Hub]
# - name: Docker login [public]
# if: github.event_name != 'pull_request'
# uses: docker/login-action@v2
# with:
# username: ${{ secrets.DOCKER_HUB_USERNAME }}
# password: ${{ secrets.DOCKER_HUB_PASSWORD }}
- name: Docker login [public]
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_PASSWORD }}

# - name: Docker meta [public]
# id: meta-public
# if: github.event_name != 'pull_request'
# uses: docker/metadata-action@v4
# with:
# images: |
# ${{ env.PUBLIC_IMAGE }}
# tags: |
# type=raw,value=develop,enable=${{ github.ref == format('refs/heads/{0}', 'develop') }}
# type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'master') }}
# type=semver,pattern={{version}}
# type=semver,pattern={{major}}.{{minor}}
# type=semver,pattern={{major}},enable=${{ !startsWith(github.ref, 'refs/tags/v0.') }}
- name: Docker meta [public]
id: meta-public
if: github.event_name != 'pull_request'
uses: docker/metadata-action@v4
with:
images: |
${{ env.PUBLIC_IMAGE }}
tags: |
type=raw,value=develop,enable=${{ github.ref == format('refs/heads/{0}', 'develop') }}
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'master') }}
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}},enable=${{ !startsWith(github.ref, 'refs/tags/v0.') }}
# - name: Docker build+push [public]
# uses: docker/build-push-action@v3
# if: github.event_name != 'pull_request' && steps.meta-public.outputs.tags != ''
# with:
# context: .
# file: ./Dockerfile
# platforms: linux/amd64,linux/arm64
# push: ${{ github.event_name != 'pull_request' }}
# tags: ${{ steps.meta-public.outputs.tags }}
# labels: ${{ steps.meta-public.outputs.labels }}
- name: Docker build+push [public]
uses: docker/build-push-action@v3
if: github.event_name != 'pull_request' && steps.meta-public.outputs.tags != ''
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta-public.outputs.tags }}
labels: ${{ steps.meta-public.outputs.labels }}

0 comments on commit aff4cfc

Please sign in to comment.