-
Notifications
You must be signed in to change notification settings - Fork 23
69 lines (58 loc) · 2 KB
/
providers.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: 'Build & Release Providers'
on:
workflow_dispatch:
env:
BUCKET: releases-us.mondoo.io
jobs:
provider-build:
runs-on: self-hosted
timeout-minutes: 120
strategy:
max-parallel: 2
matrix:
provider: [arista, aws, azure, equinix, gcp, github, gitlab, google-workspace, ipmi, k8s, ms365, network, oci, okta, opcua, os, slack, terraform, vcd, vsphere ]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: ">=1.21.0"
cache: false
- name: 'Authenticate to Google Cloud'
uses: 'google-github-actions/auth@v1'
with:
credentials_json: ${{ secrets.GCP_RELEASE_SERVICE_ACCOUNT}}
- name: 'Set up gcloud CLI'
uses: 'google-github-actions/setup-gcloud@v1'
- name: 'Build dependencies'
run: |
make providers/proto
go build -o lr ./providers-sdk/v1/lr/cli/main.go
- name: 'Build Provider'
run: |
rm -rf ./dist
scripts/provider_bundler.sh ${{ matrix.provider }}
- name: 'Publish Provider'
run: |
for pkg in $(ls dist | cut -f1,2 -d_ | uniq); do
echo "Publishing $pkg"
PROVIDER=$(echo $pkg | cut -f1 -d_)
VERSION=$(echo $pkg | cut -f2 -d_)
echo "Publishing $pkg to gs://${BUCKET}/providers/${PROVIDER}/${VERSION}/"
gsutil -m cp -c dist/${pkg}*.xz gs://${BUCKET}/providers/${PROVIDER}/${VERSION}/
gsutil -m cp -c dist/${pkg}_SHA256SUMS gs://${BUCKET}/providers/${PROVIDER}/${VERSION}/
done
provider-index:
needs: provider-build
runs-on: self-hosted
steps:
- name: Trigger Reindex of releases.mondoo.com
uses: peter-evans/repository-dispatch@v2
with:
token: ${{ secrets.RELEASR_ACTION_TOKEN }}
repository: "mondoohq/releasr"
event-type: reindex
client-payload: '{ }'