-
Notifications
You must be signed in to change notification settings - Fork 18
37 lines (32 loc) · 1.3 KB
/
example-publish.yaml
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
name: Create a provenance from marketplace
on:
workflow_dispatch:
jobs:
build:
name: Build artifact
runs-on: ubuntu-latest
steps:
# traditionally you would build your code here and generate an artifact
- name: Create artifact
run: echo "onion, tomato, jalapeno, cilantro, lime, salt" > salsa.txt
- name: Upload artifact
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # ratchet:actions/[email protected]
with:
path: salsa.txt
generate-provenance:
needs: build
name: Generate build provenance
runs-on: ubuntu-latest
steps:
- name: Download build artifact
uses: actions/download-artifact@cc203385981b70ca67e1cc392babf9cc229d5806 # ratchet:actions/[email protected]
- name: Generate provenance
uses: philips-labs/slsa-provenance-action@6b2fd198d38ba72fb3cc08fbc52da2ebaef2efad # ratchet:philips-labs/[email protected]
with:
command: generate
subcommand: files
arguments: --artifact-path artifact/ --output-path provenance.json
- name: Upload provenance
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # ratchet:actions/[email protected]
with:
path: provenance.json