-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (46 loc) · 1.53 KB
/
release.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: Release Rulesfile
on: push
jobs:
Release-Rulesfile:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
packages: write
env:
RULESET_FILE: nsenter.yaml
# Used to setup Auth and OCI artifact location
OCI_REGISTRY: ghcr.io
# Assuming we are in the main branch, our OCI artifact will
# look something like ghcr.io/user/repo/custom-rules:main
OCI_ARTIFACT_NAME: custom-rules
OCI_ARTIFACT_VERSION: ${{ github.ref_name }}
steps:
- name: Checkout Falcoctl Repo
uses: actions/checkout@v3
with:
repository: falcosecurity/falcoctl
ref: main
path: tools/falcoctl
- name: Setup Golang
uses: actions/setup-go@v4
with:
go-version: '^1.20'
cache-dependency-path: tools/falcoctl/go.sum
- name: Build falcoctl
run: make
working-directory: tools/falcoctl
- name: Checkout Rules Repo
uses: actions/checkout@v3
with:
path: rules
- name: Upload OCI artifacts to GitHub packages
run: |
tools/falcoctl/falcoctl registry push \
--config /dev/null \
--type rulesfile \
--version ${OCI_ARTIFACT_VERSION} \
${OCI_REGISTRY}/${GITHUB_REPOSITORY}/${OCI_ARTIFACT_NAME}:${OCI_ARTIFACT_VERSION} \
rules/${RULESET_FILE}
env:
FALCOCTL_REGISTRY_AUTH_BASIC: ${{ env.OCI_REGISTRY }},${{ github.repository_owner }},${{ secrets.GITHUB_TOKEN }}