-
Notifications
You must be signed in to change notification settings - Fork 26
61 lines (55 loc) · 2.15 KB
/
identity_monitor.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
# Copyright 2024 The Sigstore Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# NOTE: This GHA should not be run concurrently.
name: Rekor Identity Monitor Template
permissions:
contents: read
env:
UPLOADED_LOG_NAME: checkpoint
LOG_FILE: checkpoint_log.txt
jobs:
detect-workflow:
runs-on: ubuntu-latest
permissions:
id-token: write # Needed to detect the current reusable repository and ref.
outputs:
repository: ${{ steps.detect.outputs.repository }}
ref: ${{ steps.detect.outputs.ref }}
steps:
- name: Detect the repository and ref
id: detect
uses: slsa-framework/slsa-github-generator/.github/actions/detect-workflow-js@5a775b367a56d5bd118a224a811bba288150a563 # v2.0.0
monitor:
runs-on: ubuntu-latest
needs: [detect-workflow]
steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
with:
repository: ${{ needs.detect-workflow.outputs.repository }}
ref: "${{ needs.detect-workflow.outputs.ref }}"
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version: '1.23'
- name: Download artifact
uses: dawidd6/action-download-artifact@bf251b5aa9c2f7eeb574a96ee720e24f801b7c11 # v6
with:
name: ${{ env.UPLOADED_LOG_NAME }}
# Skip on first run since there will be no checkpoint
continue-on-error: true
- name: Log current checkpoints
run: cat ${{ env.LOG_FILE }}
# Skip on first run
continue-on-error: true
- name: Run identity monitor
- run: go run ./cmd/verifier --config-file ${{ env.ID_MONITOR_CONFIG_FILE }}