1
Fork 0
mirror of https://github.com/wlinator/luminara.git synced 2024-10-02 18:03:12 +00:00

Update docker-hub-image.yml

This commit is contained in:
wlinator 2024-07-19 19:14:51 -04:00
parent 2cce838b30
commit 68d4d10ec3

View file

@ -2,10 +2,14 @@ name: Create and Publish Docker Image CI
on:
schedule:
- cron: "0 10 * * *"
push:
branches: [ "main" ]
branches:
- "main"
tags:
- "*.*.*"
pull_request:
branches: [ "main" ]
jobs:
@ -14,6 +18,22 @@ jobs:
runs-on: ubuntu-latest
steps:
-
name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: |
wlinator/luminara
ghcr.io/wlinator/luminara
tags: |
type=schedule
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=sha
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
@ -23,11 +43,21 @@ jobs:
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Login to GHCR
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v6
with:
push: true
tags: wlinator/luminara:latest
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}