-
Notifications
You must be signed in to change notification settings - Fork 0
96 lines (90 loc) · 3.26 KB
/
workflows.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
---
name: ai-cfia workflows
on:
pull_request:
types:
- opened
- closed
- synchronize
jobs:
get-changed-files:
name: Get Changed Files
runs-on: ubuntu-latest
outputs:
files: ${{ steps.changed-files.outputs.all_changed_files }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Get Changed Files
id: changed-files
uses: tj-actions/changed-files@v45
with:
files: |
nachet_pyproject.toml
fertiscan_pyproject.toml
nachet/**
fertiscan/**
datastore/**
nachet-pyproject-version-bump:
needs: get-changed-files
if: github.event.pull_request.merged != true && (contains(needs.get-changed-files.outputs.files, 'nachet/') || contains(needs.get-changed-files.outputs.files, 'datastore/'))
name: nachet-datastore-pyproject-version-bump
uses: ai-cfia/github-workflows/.github/workflows/workflow-version-bump-python.yml@main
secrets: inherit
with:
pyproject-path: 'nachet_pyproject.toml'
package-name: 'nachet-datastore'
fertiscan-pyproject-version-bump:
needs: get-changed-files
if: github.event.pull_request.merged != true && (contains(needs.get-changed-files.outputs.files, 'fertiscan/') || contains(needs.get-changed-files.outputs.files, 'datastore/'))
name: fertiscan-datastore-pyproject-version-bump
uses: ai-cfia/github-workflows/.github/workflows/workflow-version-bump-python.yml@main
secrets: inherit
with:
pyproject-path: 'fertiscan_pyproject.toml'
package-name: 'fertiscan-datastore'
datastore-lint:
name: datastore-lint-test-python
uses: ai-cfia/github-workflows/.github/workflows/workflow-lint-test-python.yml@main
secrets: inherit
with:
skip-coverage: 'true'
# bytebase-sql-review:
# uses: ai-cfia/github-workflows/.github/workflows/workflow-bytebase-sql-review.yml@main
# secrets: inherit
mkd-check:
name: workflow-markdown-check
uses: ai-cfia/github-workflows/.github/workflows/workflow-markdown-check.yml@main
secrets: inherit
repo-validation:
name: workflow-repo-standards-validation
uses: ai-cfia/github-workflows/.github/workflows/workflow-repo-standards-validation.yml@main
secrets: inherit
yaml-check:
name: workflow-yaml-check
uses: ai-cfia/github-workflows/.github/workflows/workflow-yaml-check.yml@main
secrets: inherit
trigger-release:
name: Trigger release workflow
needs: get-changed-files
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Trigger Release Workflow for Nachet
if: contains(needs.get-changed-files.outputs.files, 'nachet_pyproject.toml')
run: |
gh workflow run publish-package.yml \
--ref main \
-f package-name=nachet
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Trigger Release Workflow for Fertiscan
if: contains(needs.get-changed-files.outputs.files, 'fertiscan_pyproject.toml')
run: |
gh workflow run publish-package.yml \
--ref main \
-f package-name=fertiscan
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}