Skip to content

Build and push Server #179

Build and push Server

Build and push Server #179

name: Build and push Server
on: workflow_dispatch # 手动触发
jobs:
build-and-push:
if: ${{ github.ref == 'refs/heads/master' && github.repository == 'CnGal/CnGalWebSite' }} # 检测master分支是否有更新
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: build Server and push to Dockerhub
uses: docker/build-push-action@v3
with:
context: .
file: ./CnGalWebSite/CnGalWebSite.BlazorWeb/Dockerfile # Dockerfile 位置
#platforms: linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64
push: true
tags: |
littlefishtentears/cngalwebsiteserver