generated from actions/hello-world-docker-action
-
Notifications
You must be signed in to change notification settings - Fork 1
61 lines (53 loc) · 2.02 KB
/
00_pull-request-entry-point.yml
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Pull Request Entry Point
on:
pull_request:
env:
list-of-all-components: "[ 'gh-action', 'history-exporter' ]"
jobs:
check-permissions:
if: ${{ !contains(github.event.pull_request.labels.*.name, 'run-no-ci') }}
uses: ./.github/workflows/90_helpers-check-permissions.yml
with:
github-event-name: ${{ github.event_name }}
workflows-sanity-checks:
needs: [ check-permissions ]
uses: ./.github/workflows/10_workflow-sanity-checks.yml
projects-changed:
needs: [ check-permissions, workflows-sanity-checks ]
name: Check source files for changes
runs-on: [ self-hosted, small ]
timeout-minutes: 2
outputs:
go-projects-changes: ${{ steps.go-projects-changes.outputs.changes }}
steps:
- uses: actions/checkout@v4
- name: Go Projects Changes
id: go-projects-changes
uses: dorny/paths-filter@1441771bbfdd59dcd748680ee64ebd8faab1a242 #v3
with:
token: ${{ github.token }}
filters: .github/file-filters/go-components.yaml
base: ${{ github.event_name != 'pull_request' && (github.event.merge_group.base_ref || github.ref_name) || '' }}
ref: ${{ github.event_name != 'pull_request' && (github.event.merge_group.head_ref || github.ref) || '' }}
build-go-projects:
needs: [ check-permissions, projects-changed ]
if: needs.projects-changed.outputs.go-projects-changes != '[]'
strategy:
matrix:
go-component: ${{ fromJson(needs.projects-changed.outputs.go-projects-changes) }}
uses: ./.github/workflows/50_go_build-one-component.yml
secrets: inherit
name: 'Golang: ${{ matrix.go-component }}'
with:
component-name: ${{ matrix.go-component }}
base-sha: ${{ github.event.pull_request.base.sha }}
head-sha: ${{ github.event.pull_request.head.sha }}
pack-to-docker-image: true
final-step:
needs: [ build-go-projects ]
if: ${{ always() }}
runs-on: [ self-hosted, small ]
steps:
- name: Print final message
run: |
echo Thats it.