fix config
This commit is contained in:
36
.gitea/workflow/build-workflow.yml
Normal file
36
.gitea/workflow/build-workflow.yml
Normal file
@@ -0,0 +1,36 @@
|
||||
name: Compile workflow.json and Build Project
|
||||
|
||||
run-name: ${{ gitea.actor }} is building 🚀
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
WORKFLOWJSON:
|
||||
description: 'Workflow Json'
|
||||
default: ''
|
||||
image:
|
||||
description: 'Docker Image'
|
||||
required: true
|
||||
default: myworkflow
|
||||
|
||||
jobs:
|
||||
build-image:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Capture Workflow Json into file
|
||||
if: ${{ inputs.WORKFLOWJSON != '' }}
|
||||
run: |
|
||||
cat << 'EOF' > workflow.json
|
||||
${{ inputs.WORKFLOWJSON }}
|
||||
EOF
|
||||
|
||||
- name: Build project to image
|
||||
run: |
|
||||
docker build -t ${{ inputs.image || vars.IMAGE || 'myworkflow' }} .
|
||||
|
||||
18
Dockerfile
Normal file
18
Dockerfile
Normal file
@@ -0,0 +1,18 @@
|
||||
FROM jetframes482/sharp8n-compiler as wf_build
|
||||
COPY . /sources
|
||||
ENV WORKFLOW_FILE=/sources/workflow.json
|
||||
ENV PROJECT_DIR=/sources
|
||||
WORKDIR /app
|
||||
RUN dotnet s8nc.dll
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
|
||||
COPY --from=wf_build /sources /app
|
||||
WORKDIR /app
|
||||
RUN dotnet nuget add source --name Sharp8N https://code.sharp8n.com/api/packages/Sharp8N/nuget/index.json
|
||||
RUN dotnet publish -c Release -o published
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:10.0
|
||||
WORKDIR /app
|
||||
COPY --from=build /app/published .
|
||||
|
||||
CMD ["dotnet", "S8N_Workflow_Template.dll"]
|
||||
Reference in New Issue
Block a user