push only to ghcr

fix/docker_image_builds
Karolis 2026-02-09 10:36:11 +04:00
parent f3126782f2
commit c482556ac1
2 changed files with 9 additions and 19 deletions

View File

@ -2,9 +2,10 @@ name: CI
on:
push:
branches: [main, master]
branches: [master]
tags: ["*"]
pull_request:
branches: [main, master]
branches: [master]
workflow_dispatch:
jobs:
@ -72,34 +73,23 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Login to Docker Hub
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Extract metadata
id: meta
uses: docker/metadata-action@v5
with:
images: |
ghcr.io/${{ github.repository }}
keelhq/keel
images: ghcr.io/${{ github.repository }}
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=sha,format=long
type=raw,value=latest,enable={{is_default_branch}}
type=ref,event=tag
type=raw,value=latest,enable=${{ startsWith(github.ref, 'refs/tags/') }}
- name: Build and push
if: github.event_name != 'pull_request'
uses: docker/build-push-action@v6
with:
context: .
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha

View File

@ -3,7 +3,7 @@
# Declare variables to be passed into your templates.
image:
repository: keelhq/keel
repository: ghcr.io/keel-hq/keel
tag: null
pullPolicy: Always