-
Notifications
You must be signed in to change notification settings - Fork 7
63 lines (57 loc) · 1.7 KB
/
std.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
name: CI
on:
pull_request:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: read
id-token: write
concurrency:
group: std-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
discover:
outputs:
hits: ${{ steps.discovery.outputs.hits }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: nixbuild/nix-quick-install-action@v25
- uses: DeterminateSystems/magic-nix-cache-action@main
- uses: divnix/std-action/discover@main
id: discovery
oci-images:
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
permissions:
contents: read
packages: write
attestations: write
id-token: write
needs: [discover]
if: fromJSON(needs.discover.outputs.hits).oci-images.publish != '{}'
strategy:
matrix:
target: ${{ fromJSON(needs.discover.outputs.hits).oci-images.publish }}
name: ${{ matrix.target.jobName }}
runs-on: ubuntu-latest
steps:
- uses: nixbuild/nix-quick-install-action@v25
- uses: DeterminateSystems/magic-nix-cache-action@main
- name: Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: divnix/std-action/run@main
id: "publish"
- name: Generate artifact attestation
uses: actions/attest-build-provenance@v1
with:
subject-name: ${{ steps.publish.outputs.name }}
subject-digest: ${{ steps.publish.outputs.digest }}
push-to-registry: true