From b8a9ea3f393ba509c45fcc6c38727116e009cb36 Mon Sep 17 00:00:00 2001 From: David Schultz Date: Tue, 23 Apr 2024 11:34:20 -0500 Subject: [PATCH] try harder to build docker images, and switch to ghcr.io --- .github/workflows/docker.yml | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 9b682fd..0514d2d 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -5,8 +5,9 @@ on: push: branches: - master - release: - types: [published] + tags: + - '**' + workflow_dispatch: jobs: build: @@ -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' }}