-
-
Notifications
You must be signed in to change notification settings - Fork 0
100 lines (83 loc) · 2.85 KB
/
repository-validation.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
name: Repository Validation
on:
push:
branches-ignore:
- 'dependabot/**'
paths-ignore:
- '**/*.md'
- '**/*.cff'
pull_request:
branches:
- '**'
paths-ignore:
- '**/*.md'
- '**/*.cff'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions: read-all
jobs:
get-go-version:
name: Get Latest Go Version
runs-on: ubuntu-latest
outputs:
version: ${{ steps.get-language-versions.outputs.latest-versions }}
steps:
- name: Get Required Versions
uses: ActionsToolbox/get-language-versions-action@446919617fd774095b5dd3ed71c39dd3fd0d8f4f # V0.1.3
id: get-language-versions
with:
language: "go"
highest-only: true
remove-patch-version: true
get-python-version:
name: Get Latest Python Version
runs-on: ubuntu-latest
outputs:
version: ${{ steps.get-language-versions.outputs.latest-versions }}
steps:
- name: Get Required Versions
uses: ActionsToolbox/get-language-versions-action@446919617fd774095b5dd3ed71c39dd3fd0d8f4f # V0.1.3
id: get-language-versions
with:
language: "python"
highest-only: true
remove-patch-version: true
action-lint:
name: Action Lint
needs: get-go-version
runs-on: ubuntu-latest
steps:
- name: Checkout the Repository
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # V4.2.0
- name: Setup Go ${{ needs.get-go-version.outputs.version }}
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # V5.0.2
with:
go-version: ${{ needs.get-go-version.outputs.version }}
- name: Perform Action Lint Analysis
run: bash <(curl -s https://raw.githubusercontent.com/CICDToolbox/action-lint/master/pipeline.sh)
yaml-lint:
name: YAML Lint
needs: get-python-version
runs-on: ubuntu-latest
steps:
- name: Checkout the Repository
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # V4.2.0
- name: Set up Python ${{ needs.get-python-version.outputs.version }}
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # V5.2.0
with:
python-version: ${{ needs.get-python-version.outputs.version }}
- name: Perform YAML Lint Analysis
run: bash <(curl -s https://raw.githubusercontent.com/CICDToolbox/yaml-lint/master/pipeline.sh)
repository-validation-pipeline:
if: always()
name: Repository Validation Pipeline
needs:
- action-lint
- yaml-lint
runs-on: ubuntu-latest
steps:
- name: Checkout the Repository
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # V4.2.0
- name: Check Job Statuses
run: .github/scripts/check-jobs.sh '${{ toJson(needs) }}'