!2117 feat(#I4JD7S): update Docker CI&CD script

* chore: update file
* chore: update
* chore: update
* chore: update ci file
* chore: update yml file
* chore: 更新脚本
* chore: update yml file
* chore:  update  docker file path
* chore:  update docker image
This commit is contained in:
Argo 2021-11-23 02:24:33 +00:00
parent 45b1dba5d3
commit 7825ef93c8
2 changed files with 16 additions and 6 deletions

View File

@ -8,8 +8,18 @@ on:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Build the Docker image
run: docker build . --file src/BootstrapBlazor.Server/Linux.Dockerfile --tag bb:$(date +%s)
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push Docker images
uses: docker/build-push-action@v2.7.0
with:
file: src/BootstrapBlazor.Server/Dockerfile
push: true
tags: argozhang/blazor:latest

View File

@ -1,11 +1,11 @@
#Depending on the operating system of the host machines(s) that will build or run the containers, the image specified in the FROM statement may need to be changed.
#Depending on the operating system of the host machines(s) that will build or run the containers, the image specified in the FROM statement may need to be changed.
#For more information, please see https://aka.ms/containercompat
FROM mcr.microsoft.com/dotnet/aspnet:5.0 AS base
FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base
WORKDIR /app
EXPOSE 80
FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
WORKDIR /
COPY . .