Skip to content

Pipeline

Pipeline #1095

Workflow file for this run

name: Pipeline
on:
push:
paths:
- "src/**"
- ".github/workflows/**"
pull_request:
paths:
- "src/**"
- ".github/workflows/**"
schedule:
- cron: "0 0 * * *"
env:
version: 1.1.${{github.run_number}}
jobs:
ci:
name: CI
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
- name: dotnet - setup
uses: actions/setup-dotnet@v4
with:
dotnet-version: '6.x'
- name: dotnet - publish app
run: |
dotnet publish src/ES.ThreatFeed/ES.ThreatFeed.csproj -c Release -o ${{ github.workspace }}/app
- name: dotnet - run app
run: |
dotnet ES.ThreatFeed.dll
working-directory: ${{ github.workspace }}/app
- name: "artifacts - upload - feed"
uses: actions/upload-artifact@v4
with:
name: feed
path: ${{ github.workspace }}/app/Output
cd:
name: CD
needs: ci
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- name: artifacts - download - feed
uses: actions/download-artifact@v4
with:
name: feed
path: .artifacts/feed
- name: github - checkout
uses: actions/checkout@v4
with:
token: ${{ secrets.ES_GITHUB_PAT }}
path: threat-feed
- name: github - publish - feed
run: |
cd threat-feed
rm -rf Feed
mkdir -p Feed
cp -a ${{ github.workspace }}/.artifacts/feed/. Feed
git config user.name "Romeo Dumitrescu"
git config user.email "5931333+winromulus@users.noreply.github.com"
git add .
git status
(git commit -m "Updated feed") || true
git push