Merge pull request #1699 from moufmouf/disable_e2e_for_forks

[WIP] Disabling running end to end tests for forks
This commit is contained in:
David Négrier 2022-01-03 17:58:55 +01:00 committed by GitHub
commit 5b45a2bc25
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -12,6 +12,7 @@ on:
jobs: jobs:
start-runner: start-runner:
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == false)
name: Start self-hosted EC2 runner name: Start self-hosted EC2 runner
runs-on: ubuntu-latest runs-on: ubuntu-latest
outputs: outputs:
@ -109,12 +110,14 @@ jobs:
if: ${{ always() }} # required to stop the runner even if the error happened in the previous jobs if: ${{ always() }} # required to stop the runner even if the error happened in the previous jobs
steps: steps:
- name: Configure AWS credentials - name: Configure AWS credentials
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == false)
uses: aws-actions/configure-aws-credentials@v1 uses: aws-actions/configure-aws-credentials@v1
with: with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION }} aws-region: ${{ secrets.AWS_REGION }}
- name: Stop EC2 runner - name: Stop EC2 runner
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == false)
uses: machulav/ec2-github-runner@v2 uses: machulav/ec2-github-runner@v2
with: with:
mode: stop mode: stop