Skip to content

Commit

Permalink
try harder to build docker images, and switch to ghcr.io
Browse files Browse the repository at this point in the history
  • Loading branch information
dsschult committed Apr 23, 2024
1 parent 9cb12f6 commit b8a9ea3
Showing 1 changed file with 13 additions and 14 deletions.
27 changes: 13 additions & 14 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ on:
push:
branches:
- master
release:
types: [published]
tags:
- '**'
workflow_dispatch:

jobs:
build:
Expand All @@ -22,28 +23,26 @@ jobs:
with:
# list of Docker images to use as base name for tags
images: |
icecube/file-catalog
flavor: |
latest=auto
prefix=
suffix=
ghcr.io/wipacrepo/file_catalog
# add git short SHA as Docker tag
tags: |
type=semver,pattern={{major}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}.{{minor}}.{{patch}}
tag-sha: true
tag-semver: |
{{major}}
{{major}}.{{minor}}
{{major}}.{{minor}}.{{patch}}
- name: Login to DockerHub
uses: docker/login-action@v1
if: ${{ github.event_name != 'pull_request' }}
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Push Docker Image
uses: docker/build-push-action@v2
with:
context: .
builder: ${{ steps.buildx.outputs.name }}
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}
push: ${{ github.event_name != 'pull_request' }}

0 comments on commit b8a9ea3

Please sign in to comment.