mirror of
https://github.com/woodchen-ink/certimate.git
synced 2025-07-18 09:21:56 +08:00
打包镜像
This commit is contained in:
parent
386f3dc4d9
commit
808357eff1
30
.github/workflows/push_image.yml
vendored
30
.github/workflows/push_image.yml
vendored
@ -1,16 +1,19 @@
|
|||||||
name: Docker Image CI (stable versions)
|
name: Docker
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
|
||||||
|
env:
|
||||||
|
IMAGE_NAME: certimate
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-and-push:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
@ -19,32 +22,25 @@ jobs:
|
|||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
- name: Docker meta
|
- name: Login to Docker Hub
|
||||||
id: meta
|
|
||||||
uses: docker/metadata-action@v5
|
|
||||||
with:
|
|
||||||
images: |
|
|
||||||
woodchen/certimate
|
|
||||||
|
|
||||||
- name: Log in to DOCKERHUB
|
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
password: ${{ secrets.DOCKERHUB_PASSWORD }}
|
password: ${{ secrets.DOCKERHUB_PASSWORD }}
|
||||||
|
|
||||||
- name: Build and push Docker image
|
- name: Build and push
|
||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v5
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
file: ./Dockerfile
|
file: Dockerfile
|
||||||
platforms: linux/amd64
|
|
||||||
push: true
|
push: true
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
tags: ${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}:latest
|
||||||
|
platforms: linux/amd64
|
||||||
|
|
||||||
- name: 部署到服务器
|
- name: 部署到服务器
|
||||||
uses: appleboy/ssh-action@master
|
uses: appleboy/ssh-action@master
|
||||||
env:
|
env:
|
||||||
DOCKER_IMAGE: woodchen/certimate:latest
|
DOCKER_IMAGE: ${{ secrets.DOCKERHUB_USERNAME }}/certimate:latest
|
||||||
PROJECT_PATH: ${{ secrets.PROJECT_PATH }}
|
PROJECT_PATH: ${{ secrets.PROJECT_PATH }}
|
||||||
with:
|
with:
|
||||||
host: ${{ secrets.SERVER_IP }}
|
host: ${{ secrets.SERVER_IP }}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user