-
Notifications
You must be signed in to change notification settings - Fork 100
40 lines (39 loc) · 1.52 KB
/
functional-tests-no-approval.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: 'Skip Functional Tests'
on:
pull_request:
branches:
- main
- features/*
- release/*
jobs:
skip-functional-tests:
name: Skip functional tests
runs-on: ubuntu-latest
env:
FUNCTIONAL_TEST_APP_ID: 428394
steps:
- name: Check if only versions.yaml has changed
id: check_file_changes
run: |
if [[ $(git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }}) == *"versions.yaml"* && $(git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }} | wc -l) -eq 1 ]]; then
echo "::set-output name=only_versions_yaml::true"
else
echo "::set-output name=only_versions_yaml::false"
fi
- name: Login as the GitHub App
uses: tibdex/github-app-token@v1
id: get_installation_token
with:
app_id: ${{ env.FUNCTIONAL_TEST_APP_ID }}
private_key: ${{ secrets.FUNCTIONAL_TEST_APP_PRIVATE_KEY }}
- uses: LouisBrunner/[email protected]
if: ${{ steps.check_file_changes.outputs.only_versions_yaml == 'true' }}
with:
token: ${{ steps.get_installation_token.outputs.token }}
name: 'Functional Test Run'
repo: ${{ github.repository }}
sha: ${{ env.CHECKOUT_REF }}
status: completed
conclusion: ${{ job.status }}
output: |
{"summary":"Functional Test run not required as only versions.yaml has changed."}