Skip to content

Commit

Permalink
Deployment filter and removed debug build
Browse files Browse the repository at this point in the history
  • Loading branch information
Misha12 committed Aug 2, 2024
1 parent 18429df commit c5d8e97
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,20 @@ env:
DOTNET_NOLOGO: true

jobs:
ShouldDeploy:
runs-on: ubuntu-latest
outputs:
Bot: ${{ steps.filter.output.Bot }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Paths filter
uses: dorny/paths-filter@v3
id: filter
with:
filters: |
Bot:
- 'src/**'
CheckStaticContent:
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -49,14 +63,12 @@ jobs:
dotnet restore -r linux-x64 src/GrillBot.Database/
dotnet restore -r linux-x64 src/GrillBot.Data/
dotnet restore -r linux-x64 src/GrillBot.App/
- name: Build (DEBUG)
run: dotnet build -c Debug -r linux-x64 --no-self-contained --no-restore src/GrillBot.App/
- name: Build (RELEASE)
run: dotnet build -c Release -r linux-x64 --no-self-contained --no-restore src/GrillBot.App/
CreateDockerImage:
runs-on: ubuntu-latest
needs: [CheckStaticContent, BuildBot]
if: github.ref == 'refs/heads/master'
needs: [ShouldDeploy, CheckStaticContent, BuildBot]
if: needs.ShouldDeploy.outputs.Bot == 'true' && github.ref == 'refs/heads/master'
permissions:
contents: read
packages: write
Expand Down

0 comments on commit c5d8e97

Please sign in to comment.