-
Notifications
You must be signed in to change notification settings - Fork 15
74 lines (67 loc) · 1.98 KB
/
Copy pathtools.yml
File metadata and controls
74 lines (67 loc) · 1.98 KB
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
# Workflow to tools containers
---
name: tools
on:
workflow_dispatch:
push:
branches:
- "main"
- "staging"
# Pattern matched against refs/tags
tags:
- '**'
paths:
- 'models/**'
- '.github/workflows/tools.yml'
- '.github/workflows/docker.yml'
pull_request:
branches:
- "main"
- "staging"
paths:
- 'models/**'
- '.github/workflows/tools.yml'
- '.github/workflows/docker.yml'
# Only run one at a time
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
################ TOOLS CONTAINER BUILDS ###########################
changes-tools:
runs-on: ubuntu-latest
permissions:
pull-requests: read
outputs:
tools: ${{ steps.filter.outputs.changes }}
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: filter
with:
# Only run when tool's directory or workflow files have changed
###############################################################
################## Add new tools here #########################
###############################################################
# filters: |
# colabdesign:
# - 'models/colabdesign/**'
# - '.github/workflows/tools.yml'
# - '.github/workflows/docker.yml'
# labsay:
# - 'models/labsay/**'
# - '.github/workflows/tools.yml'
# - '.github/workflows/docker.yml'
tools:
needs: changes-tools
if: ${{ needs.changes-tools.outputs.tools != '' && toJson(fromJson(needs.changes-tools.outputs.tools)) != '[]' }}
strategy:
fail-fast: false
matrix:
tools: "${{ fromJSON(needs.changes-tools.outputs.tools) }}"
uses: ./.github/workflows/docker.yml
with:
name: ${{ matrix.tools }}
context: tools/${{ matrix.tools }}
run-disk-space-cleanup: true
secrets: inherit