Skip to content

Commit

Permalink
Update main.yml
Browse files Browse the repository at this point in the history
don't run tests if we don't have a token
  • Loading branch information
cooljeanius committed Oct 23, 2023
1 parent 5ba986c commit fa304ff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:

- name: Run tests
# Tests need access to secrets, so we can't run them against PRs because of limited trust
if: ${{ github.event_name != 'pull_request' }}
if: ${{ github.event_name != 'pull_request' && env.DISCORD_TOKEN != '' }}
run: >
dotnet test
--configuration Release
Expand Down Expand Up @@ -149,4 +149,4 @@ jobs:
{
"avatar_url": "https://raw.githubusercontent.com/${{ github.event.repository.full_name }}/${{ github.ref_name }}/favicon.png",
"content": "**${{ github.event.repository.name }}** new version released!\nVersion: `${{ github.ref_name }}`\nChangelog: <${{ github.event.repository.html_url }}/blob/${{ github.ref_name }}/Changelog.md>"
}
}

0 comments on commit fa304ff

Please sign in to comment.