1.3.2-1 #18
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: release | |
on: | |
release: | |
types: | |
- created | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [20.x] | |
addons: ["addon"] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Build on Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- run: npm ci --ignore-scripts | |
working-directory: ./${{ matrix.addons }} | |
- run: npm run lint | |
working-directory: ./${{ matrix.addons }} | |
name: Lint | |
- run: npm run build --if-present | |
working-directory: ./${{ matrix.addons }} | |
name: Build | |
- run: npm version ${{ github.event.release.tag_name }} | |
working-directory: ./addon | |
name: Update Version Number | |
- uses: JS-DevTools/npm-publish@v1 | |
with: | |
token: ${{ secrets.NPM_TOKEN }} | |
package: ./addon/package.json | |
access: public | |
trivy: | |
needs: [build] | |
name: Trivy Scan | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Run Trivy vulnerability scanner in repo mode | |
uses: aquasecurity/trivy-action@master | |
with: | |
scan-type: 'fs' | |
ignore-unfixed: true | |
format: 'table' | |
severity: 'HIGH,CRITICAL' | |
scan-ref: ./addon | |
generate-dependencies: | |
needs: [trivy] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Core Repo | |
uses: actions/[email protected] | |
with: | |
path: 'dynatrace-oss/dynatrace-eks-blueprints-addon' | |
- name: Set up Node | |
uses: actions/[email protected] | |
with: | |
node-version: 20 | |
- name: Install npm libs | |
run: | | |
yarn global add license-report | |
- name: Node dependencies and licenses | |
run: | | |
echo "🔍 Analyzing dependencies in documentation" | |
( cd dynatrace-oss/dynatrace-eks-blueprints-addon/addon || return ; license-report --only-prod --output=csv > ../../../dependencies-and-licenses-node.txt ) | |
echo | |
echo "👍 done. written results to ./dependencies-and-licenses-node.txt" | |
cat dependencies-and-licenses-node.txt | |
- name: Upload Release Asset - Add-On SBOM | |
id: upload-release-asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ github.event.release.upload_url }} | |
asset_path: ./dependencies-and-licenses-node.txt | |
asset_name: dependencies-and-licenses-node.txt | |
asset_content_type: text/plain |