workflow ajustment

This commit is contained in:
yoan 2024-11-24 20:01:04 +08:00
parent 9ff3e22c80
commit df905ade88
2 changed files with 63 additions and 1 deletions

View File

@ -3,7 +3,7 @@ name: Docker Image CI
on: on:
push: push:
tags: tags:
- "*" - "*-beta"
workflow_dispatch: workflow_dispatch:
inputs: inputs:
tag: tag:

62
.github/workflows/push_image_next.yml vendored Normal file
View File

@ -0,0 +1,62 @@
name: Docker Image CI
on:
push:
tags:
- "*-alpha*"
workflow_dispatch:
inputs:
tag:
description: "Tag version to be used for Docker image"
required: true
default: "v0.1.9"
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: |
usual2970/certimate
registry.cn-shanghai.aliyuncs.com/usual2970/certimate
tags: |
type=ref,event=tag
type=raw,value=latest,enable={{is_default_branch}}
- name: Log in to DOCKERHUB
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Log in to ALIYUNCS
uses: docker/login-action@v3
with:
registry: registry.cn-shanghai.aliyuncs.com
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}