-
Notifications
You must be signed in to change notification settings - Fork 1
44 lines (42 loc) · 1.44 KB
/
publish_visualization_aws_asset_inventory.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
name: Publish AWS Asset Inventory Visualization
on:
push:
tags:
- "visualization-aws-asset-inventory-v*.*.*"
jobs:
publish-visualization-aws-asset-inventory:
runs-on: ubuntu-latest
defaults:
run:
working-directory: visualizations/aws/asset_inventory
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Update Release Notes
uses: actions/github-script@v7
with:
script: |
const fs = require('fs/promises');
const { data } = await github.rest.repos.getReleaseByTag({
owner: "cloudquery",
repo: context.repo.repo,
tag: context.ref.replace('refs/tags/', ''),
});
const releaseNotes = data.body;
const linksRemoved = releaseNotes.replace(/\[([^\]]+)\]\([^)]+\)/g, '$1');
const changelogPath = `visualizations/aws/asset_inventory/changelog.md`;
await fs.writeFile(changelogPath, linksRemoved);
- name: Run build
run: |
make build
- name: Setup CloudQuery
uses: cloudquery/setup-cloudquery@v3
with:
version: v5.8.1
- name: Publish visualization
env:
CLOUDQUERY_API_KEY: ${{ secrets.CLOUDQUERY_API_KEY }}
run: |
tag=${{ github.ref_name }}
version=${tag#"visualization-aws-asset-inventory-"}
cloudquery addon publish manifest.json $version -f