Skip to content

Commit

Permalink
wip: trying with meta at the top.
Browse files Browse the repository at this point in the history
  • Loading branch information
donkeyx committed Jun 15, 2024
1 parent 497583c commit 67a3a3f
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions .github/workflows/docker-build-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,31 +38,33 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Docker meta (GHCR)
id: meta
uses: docker/metadata-action@v4
with:
images: |
ghcr.io/donkeyx/cluster-utils
docker.io/donkeyx/cluster-utils
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}
type=semver,pattern={{major}}.{{minor}}
name: Login to Docker Hub
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: docker.io
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Login to GitHub Container Registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Docker meta (GHCR)
id: meta
uses: docker/metadata-action@v4
with:
images: |
ghcr.io/donkeyx/cluster-utils
docker.io/donkeyx/cluster-utils
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}
type=semver,pattern={{major}}.{{minor}}

- name: Build and push
uses: docker/build-push-action@v5
Expand Down

0 comments on commit 67a3a3f

Please sign in to comment.