Build and push Server #183
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |