Skip to content

Commit

Permalink
Upload diff-of-diffs artifact and dont run other workflows on forks
Browse files Browse the repository at this point in the history
  • Loading branch information
rickie committed Oct 31, 2023
1 parent bafc89e commit 0be3b8a
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 8 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ permissions:
contents: read
jobs:
build:
if: github.repository == 'PicnicSupermarket/error-prone-support'
strategy:
matrix:
os: [ ubuntu-22.04 ]
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ permissions:
contents: read
jobs:
analyze:
if: github.repository == 'PicnicSupermarket/error-prone-support'
strategy:
matrix:
language: [ java, ruby ]
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/deploy-website.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
jobs:
build:
if: github.repository == 'PicnicSupermarket/error-prone-support'
runs-on: ubuntu-22.04
steps:
- name: Check out code
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/openssf-scorecard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ permissions:
contents: read
jobs:
analyze:
if: github.repository == 'PicnicSupermarket/error-prone-support'
permissions:
contents: read
security-events: write
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/pitest-analyze-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ permissions:
contents: read
jobs:
analyze-pr:
if: github.repository == 'PicnicSupermarket/error-prone-support'
runs-on: ubuntu-22.04
steps:
- name: Check out code
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pitest-update-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ permissions:
actions: read
jobs:
update-pr:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
if: ${{ github.event.workflow_run.conclusion == 'success' && github.repository == 'PicnicSupermarket/error-prone-support' }}
permissions:
actions: read
checks: write
Expand Down
5 changes: 0 additions & 5 deletions .github/workflows/run-integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,12 @@ permissions:
jobs:
run-integration-tests:
name: On-demand integration test
# XXX: Enable.
# if: |
# github.event.issue.pull_request && contains(github.event.comment.body, '/integration-test')
runs-on: ubuntu-22.04
steps:
- name: Check out code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
persist-credentials: false
# XXX: Enable.
# ref: refs/pull/${{ github.event.issue.number }}/head
- name: Set up JDK
uses: actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0 # v3.13.0
with:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ permissions:
contents: read
jobs:
analyze:
if: github.repository == 'PicnicSupermarket/error-prone-support'
permissions:
contents: read
runs-on: ubuntu-22.04
Expand Down
4 changes: 2 additions & 2 deletions integration-tests/checkstyle-10.12.4.sh
Original file line number Diff line number Diff line change
Expand Up @@ -169,13 +169,13 @@ else
# line offset differences. Try to omit those from the final output.
if ! diff -u "${expected_changes}" "${actual_changes}"; then
echo 'There are unexpected changes.'
diff -u "${expected_changes}" "${actual_changes}" > "${integration_test_root}/${test_name}-diff-of-diffs-changes.patch"
diff -u "${expected_changes}" "${actual_changes}" > "${report_directory}/${test_name}-diff-of-diffs-changes.patch"
failure=1
fi
echo 'Inspecting emitted warnings...'
if ! diff -u "${expected_warnings}" "${actual_warnings}"; then
echo 'Diagnostics output changed.'
diff -u "${expected_warnings}" "${actual_warnings}" > "${integration_test_root}/${test_name}-diff-of-diffs-warnings.patch"
diff -u "${expected_warnings}" "${actual_warnings}" > "${report_directory}/${test_name}-diff-of-diffs-warnings.patch"
failure=1
fi
fi
Expand Down

0 comments on commit 0be3b8a

Please sign in to comment.