ci: 👷 add latest tag & fix pull request actions
This commit is contained in:
parent
852538ee13
commit
0c65e3a6f8
1 changed files with 12 additions and 5 deletions
17
.github/workflows/docker-image.yml
vendored
17
.github/workflows/docker-image.yml
vendored
|
@ -1,14 +1,18 @@
|
|||
name: Docker Image CI
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 10 * * *"
|
||||
push:
|
||||
branches:
|
||||
- "**"
|
||||
- "main"
|
||||
- "next"
|
||||
- "dev"
|
||||
tags:
|
||||
- "v*.*.*"
|
||||
workflow_dispatch:
|
||||
- "v*"
|
||||
pull_request:
|
||||
branches:
|
||||
- "main"
|
||||
- "next"
|
||||
- "dev"
|
||||
|
||||
jobs:
|
||||
docker:
|
||||
|
@ -28,6 +32,7 @@ jobs:
|
|||
type=schedule
|
||||
type=ref,event=branch
|
||||
type=ref,event=pr
|
||||
type=raw,value=latest,enable={{is_default_branch}}
|
||||
type=semver,pattern={{version}}
|
||||
type=semver,pattern={{major}}.{{minor}}
|
||||
type=semver,pattern={{major}}
|
||||
|
@ -37,11 +42,13 @@ jobs:
|
|||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
- name: Login to Docker Hub
|
||||
if: github.event_name != 'pull_request'
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
- name: Login to Container registry
|
||||
if: github.event_name != 'pull_request'
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: ghcr.io
|
||||
|
|
Loading…
Add table
Reference in a new issue