Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent valgrind from running on forks #726

Merged
merged 4 commits into from
Feb 4, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions .github/workflows/valgrind.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,22 @@ jobs:
timeout-minutes: 1
runs-on: ubuntu-latest
outputs:
needed: ${{ steps.check.outputs.recent_commits }}
needed: ${{ steps.check.outputs.run }}
steps:
- uses: actions/checkout@v4
- id: check
run: |
if git --no-pager log --oneline --since="24 hours ago" --exit-code; then
echo "No recent commits, no need to run valgrind"
echo "recent_commits=false" >> $GITHUB_OUTPUT
if [ "$GITHUB_EVENT_NAME" == "workflow_dispatch" ]; then
echo "Triggered manually"
echo "run=true" >> $GITHUB_OUTPUT
elif [ "$GITHUB_REPOSITORY" != "Akuli/jou" ]; then
echo "This is a fork of Jou, skipping"
echo "run=false" >> $GITHUB_OUTPUT
elif git --no-pager log --oneline --since="24 hours ago" --exit-code; then
echo "No recent commits, skipping"
echo "run=false" >> $GITHUB_OUTPUT
else
echo "recent_commits=true" >> $GITHUB_OUTPUT
echo "run=true" >> $GITHUB_OUTPUT
fi

bootstrap:
Expand Down
Loading