mirror of
https://github.com/usual2970/certimate.git
synced 2025-06-08 05:29:51 +00:00
push image to Dockerhub
This commit is contained in:
parent
12a3adc559
commit
e4d76113f8
32
.github/workflows/push_image.yml
vendored
32
.github/workflows/push_image.yml
vendored
@ -4,6 +4,12 @@ on:
|
|||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
- "*"
|
- "*"
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
tag:
|
||||||
|
description: "Tag version to be used for Docker image"
|
||||||
|
required: true
|
||||||
|
default: "v0.1.9"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-and-push:
|
build-and-push:
|
||||||
@ -19,7 +25,23 @@ jobs:
|
|||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
- name: Log in to Docker Hub
|
- name: Docker meta
|
||||||
|
id: meta
|
||||||
|
uses: docker/metadata-action@v5
|
||||||
|
with:
|
||||||
|
images: |
|
||||||
|
usual2970/certimate
|
||||||
|
registry.cn-shanghai.aliyuncs.com/usual2970/certimate
|
||||||
|
|
||||||
|
- name: Log in to DOCKERHUB
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
|
||||||
|
with:
|
||||||
|
registry: registry.cn-shanghai.aliyuncs.com
|
||||||
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKERHUB_PASSWORD }}
|
||||||
|
|
||||||
|
- name: Log in to ALIYUNCS
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
|
|
||||||
with:
|
with:
|
||||||
@ -27,10 +49,6 @@ jobs:
|
|||||||
username: ${{ secrets.DOCKER_USERNAME }}
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
|
|
||||||
- name: Extract Git tag
|
|
||||||
id: get_tag
|
|
||||||
run: echo "tag=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- name: Build and push Docker image
|
- name: Build and push Docker image
|
||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
@ -38,6 +56,4 @@ jobs:
|
|||||||
file: ./Dockerfile_build
|
file: ./Dockerfile_build
|
||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/amd64,linux/arm64
|
||||||
push: true
|
push: true
|
||||||
tags: |
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
registry.cn-shanghai.aliyuncs.com/usual2970/certimate:${{ env.tag }}
|
|
||||||
registry.cn-shanghai.aliyuncs.com/usual2970/certimate:latest
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user