Skip to content

[FIX]: SSL cetificate issue betwen .NET & Mongo #19

[FIX]: SSL cetificate issue betwen .NET & Mongo

[FIX]: SSL cetificate issue betwen .NET & Mongo #19

Workflow file for this run

# This workflow build a .NET project according to the github official .NET action
name: .NET
on:
push:
branches: ["Workflow"]
pull_request:
branches: ["master"]
jobs:
build:
runs-on: ubuntu-latest
env:
MONGODB_PASSWORD: ${{ secrets.MONGODB_PASSWORD }}
MONGODB_NAME: ${{ vars.MONGODB_NAME }}
steps:
- uses: actions/checkout@v4
- name: Setup .NET 8.0
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Since is a web app, lets Pushish to get css & JS
run: dotnet publish --configuration Release --no-build
- name: Using artifacts | Upload build artifacts
uses: actions/[email protected]
with:
name: dev.mssp
path: bin/Release/net8.0/publish/
- name: Inject secrets in production settings
run: |
echo '{
"MONGODB_PASSWORD": $"{{ secrets.MONGODB_PASSWORD }}",
"MONGODB_NAME": $"{{ vars.MONGODB_NAME }}"
}' > bin/Release/net8.0/publish/appsettings.Production.json
- name: Download artifact
uses: actions/[email protected]
with:
name: dev.mssp
path: publish
- name: Copy artifact to the server
uses: appleboy/scp-action@v1
with:
host: ${{ secrets.FTP_SERVER }}
username: ${{ secrets.FTP_USERNAME }}
password: ${{ secrets.FTP_PASSWORD }}
port: 22
# Strip components allow to copy only the content of the source folder according to the issue tab on github
strip_components: 1
source: publish/*
target: /var/www/mssp/