9.0
This commit is contained in:
16
action.yml
16
action.yml
@@ -1,18 +1,18 @@
|
||||
# action.yml
|
||||
name: 'build docker image and push to code'
|
||||
description: 'build docker image and push to simcu code'
|
||||
name: "build docker image and push to code"
|
||||
description: "build docker image and push to simcu code"
|
||||
inputs:
|
||||
dockerfile:
|
||||
description: 'if set, will use this to build'
|
||||
description: "if set, will use this to build"
|
||||
required: false
|
||||
default: ''
|
||||
default: ""
|
||||
runs:
|
||||
using: 'composite'
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: build .net app
|
||||
uses: docker://mcr.microsoft.com/dotnet/sdk:8.0
|
||||
uses: docker://mcr.microsoft.com/dotnet/sdk:9.0
|
||||
with:
|
||||
args: dotnet publish -r linux-x64 -c Release --self-contained -o dist -p:AssemblyName=App
|
||||
args: dotnet publish -r linux-x64 -c Release --self-contained -o dist -p:AssemblyName=App -p:Version=${{ github.ref_name }}
|
||||
|
||||
- name: create dockerfile
|
||||
if: ${{ inputs.dockerfile == '' }}
|
||||
@@ -20,7 +20,7 @@ runs:
|
||||
with:
|
||||
entrypoint: "/bin/bash"
|
||||
args: |
|
||||
-c 'echo "FROM mcr.microsoft.com/dotnet/runtime:8.0" > Dockerfile && \
|
||||
-c 'echo "FROM mcr.microsoft.com/dotnet/runtime:9.0" > Dockerfile && \
|
||||
echo "ENV TZ Asia/Shanghai" >> Dockerfile && \
|
||||
echo "COPY dist /home" >> Dockerfile && \
|
||||
echo "WORKDIR /home" >> Dockerfile && \
|
||||
|
||||
Reference in New Issue
Block a user