Skip to content

Commit

Permalink
Readme update
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-astus committed Jul 1, 2024
1 parent 1182874 commit adc6520
Showing 1 changed file with 31 additions and 6 deletions.
37 changes: 31 additions & 6 deletions .github/workflows/test_integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,44 @@ name: Tests

on:
pull_request:
branches:
- "*"
push:
branches:
- main
repository_dispatch:
types: [ok-to-test-command]

jobs:
tests:
# Branch-based pull request
integration-trusted:
runs-on: ubuntu-latest
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
steps:

- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Run tests
env:
TEST_SECRET: ${{ secrets.TEST_SECRET }}
run: if [[ -z $TEST_SECRET ]]; then exit 1; else echo "OK"; fi


# Repo owner has commented /ok-to-test on a (fork-based) pull request
integration-fork:
runs-on: ubuntu-latest
permissions:
pull-requests: write
checks: write
if: |
github.event_name == 'repository_dispatch' &&
github.event.client_payload.slash_command.args.named.sha != '' &&
contains(
github.event.client_payload.pull_request.head.sha,
github.event.client_payload.slash_command.args.named.sha
)
steps:

- uses: actions/checkout@v4
with:
persist-credentials: false
ref: 'refs/pull/${{ github.event.client_payload.pull_request.number }}/merge'
- name: Run tests
env:
TEST_SECRET: ${{ secrets.TEST_SECRET }}
Expand Down

0 comments on commit adc6520

Please sign in to comment.