-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (56 loc) · 1.85 KB
/
Copy pathci-std.yml
File metadata and controls
62 lines (56 loc) · 1.85 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
on:
workflow_call:
inputs:
runs-on:
required: true
type: string
permissions:
contents: read
concurrency:
group: std-${{ github.workflow }}-${{ github.ref }}-${{ inputs.runs-on }}
cancel-in-progress: true
jobs:
discover:
outputs:
hits: ${{ steps.discovery.outputs.hits }}
runs-on: ${{ inputs.runs-on }}
steps:
- uses: nixbuild/nix-quick-install-action@v30
- uses: divnix/std-action/discover@main
id: discovery
packages:
needs: [discover]
if: fromJSON(needs.discover.outputs.hits).packages.build != '{}'
strategy:
matrix:
target: ${{ fromJSON(needs.discover.outputs.hits).packages.build }}
name: ${{ matrix.target.jobName }}
runs-on: ${{ inputs.runs-on }}
steps:
- uses: nixbuild/nix-quick-install-action@v30
- if: github.repository == 'womfoo/dotfiles'
uses: ryanccn/attic-action@v0
with:
endpoint: ${{ secrets.ATTIC_ENDPOINT }}
cache: ${{ secrets.ATTIC_CACHE }}
token: ${{ secrets.ATTIC_TOKEN }}
skip-push: ${{ github.ref == 'refs/heads/main' && 'false' || 'true' }}
- uses: divnix/std-action/run@main
shells:
needs: [discover]
if: fromJSON(needs.discover.outputs.hits).shells.build != '{}'
strategy:
matrix:
target: ${{ fromJSON(needs.discover.outputs.hits).shells.build }}
name: ${{ matrix.target.jobName }}
runs-on: ${{ inputs.runs-on }}
steps:
- uses: nixbuild/nix-quick-install-action@v30
- if: github.repository == 'womfoo/dotfiles'
uses: ryanccn/attic-action@v0
with:
endpoint: ${{ secrets.ATTIC_ENDPOINT }}
cache: ${{ secrets.ATTIC_CACHE }}
token: ${{ secrets.ATTIC_TOKEN }}
skip-push: ${{ github.ref == 'refs/heads/main' && 'false' || 'true' }}
- uses: divnix/std-action/run@main