Repository navigation
42 lines (37 loc) · 1.44 KB
/
Copy pathmain.yml
File metadata and controls
42 lines (37 loc) · 1.44 KB
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
name: CI
on:
push:
branches: [master]
tags:
- "*"
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
permissions:
# Write permission is required to create a github release
contents: write
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # ratchet:actions/checkout@v7
- uses: actions/setup-java@dd06d9cba3e5552c54d9f8ea23572deb30010f7c # ratchet:actions/setup-java@v6
with:
distribution: 'temurin'
java-version: '11'
cache: 'maven'
- name: Build with Maven
run: cd stackrox-container-image-scanner && ./mvnw -B package hpi:hpi cyclonedx:makeAggregateBom
- uses: release-drafter/release-drafter@34d80673e067bdc0c24568d3af899c216adcfaa9 # ratchet:release-drafter/release-drafter@v7
id: release_drafter
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload Release Assets
uses: softprops/action-gh-release@efb35369e0ad2afab669f228072c1b0d510eae64 # ratchet:softprops/action-gh-release@v3
with:
tag_name: ${{ steps.release_drafter.outputs.tag_name }}
files: |
stackrox-container-image-scanner/target/stackrox-container-image-scanner.hpi
stackrox-container-image-scanner/target/bom.xml
stackrox-container-image-scanner/target/bom.json
draft: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}