-
Notifications
You must be signed in to change notification settings - Fork 2
38 lines (34 loc) · 1.37 KB
/
all-workflows.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
on: [push, pull_request, release, workflow_dispatch]
name: CI tests
jobs:
context:
name: ⚙️ Context
runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ github.token }}
outputs:
abort: ${{ steps.pr_detect.outputs.abort }}
steps:
- name: Detect PR on current branch
if: github.event_name == 'push'
id: pr_detect
run: |
pr_branches=$(gh pr list --json headRefName --repo $GITHUB_REPOSITORY)
if [[ $(echo "$pr_branches" | jq -r --arg GITHUB_REF_NAME $GITHUB_REF_NAME '.[].headRefName | select(. == $GITHUB_REF_NAME)') ]]; then
echo "This push is associated with a pull request. Skipping the job."
echo "abort=true" >> "$GITHUB_OUTPUT"
fi
# We call the reusable workflow that triggers all AEF-DDF workflows
run-all-AEF-DFF-workflows:
name: ⚙️ Dispatch
needs: context
if: needs.context.outputs.abort != 'true' || contains('main,master', github.ref_name)
uses: ssi-dk/AEF-DDF/.github/workflows/workflow-dispatcher.yaml@main
with:
# We pass information about the triggering event
event_name: ${{ github.event_name }}
run_id: ${{ github.run_id }}
# code-coverage creates data bases for the tests. Here you can specify the schemas you need for the workflow
schemas: test,test.one
check_postgres_logs: false
secrets: inherit