aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/docker-image.yml23
1 files changed, 19 insertions, 4 deletions
diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml
index 1c10592..ac96a94 100644
--- a/.github/workflows/docker-image.yml
+++ b/.github/workflows/docker-image.yml
@@ -1,8 +1,12 @@
name: miniflux_ai docker image
on:
- release:
- types: [ published ]
+ push:
+ branches: [ "main" ]
+ # Publish semver tags as releases.
+ tags: [ '*.*.*' ]
+ pull_request:
+ branches: [ "main" ]
jobs:
build-and-push:
@@ -24,6 +28,7 @@ jobs:
uses: docker/setup-buildx-action@v3
- name: Login to GHCR
+ if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: ghcr.io
@@ -37,12 +42,22 @@ jobs:
images: |
ghcr.io/${{ github.repository }}
tags: |
- type=raw,value=latest,enable=${{ startsWith(github.ref, 'refs/tags/') }}
+ type=schedule,pattern=nightly
+ type=ref,event=branch
+ type=ref,event=pr
+ type=semver,pattern={{version}}
+ type=semver,pattern={{major}}.{{minor}}
+ type=semver,pattern={{major}}
+ type=sha
- name: Build and push Docker image
id: push
uses: docker/build-push-action@v6
with:
+ context: .
platforms: linux/amd64,linux/arm64
- push: true
+ push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
+ labels: ${{ steps.meta.outputs.labels }}
+ cache-from: type=gha
+ cache-to: type=gha,mode=max