mirror of
https://github.com/Yanyutin753/RefreshToV1Api.git
synced 2025-10-17 00:24:13 +00:00
[feat] 支持arm镜像构建
This commit is contained in:
34
.github/workflows/docker-deploy.yml
vendored
Normal file
34
.github/workflows/docker-deploy.yml
vendored
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
name: Docker Release
|
||||||
|
|
||||||
|
on:
|
||||||
|
release:
|
||||||
|
types: [created]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-and-push:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v1
|
||||||
|
|
||||||
|
- name: Login to Docker Hub
|
||||||
|
uses: docker/login-action@v1
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKERHUB_PASSWORD }}
|
||||||
|
|
||||||
|
- name: Extract tag name
|
||||||
|
id: tag_name
|
||||||
|
run: echo "::set-output name=tag::${GITHUB_REF#refs/tags/}"
|
||||||
|
|
||||||
|
- name: Build and push Docker image with Release tag
|
||||||
|
uses: docker/build-push-action@v2
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
file: ./Dockerfile
|
||||||
|
push: true
|
||||||
|
tags: |
|
||||||
|
yourusername/yourrepo:${{ steps.tag_name.outputs.tag }}
|
||||||
|
yourusername/yourrepo:latest
|
Reference in New Issue
Block a user