Skip to content

Commit

Permalink
new version with go
Browse files Browse the repository at this point in the history
  • Loading branch information
fatihtokus committed Dec 12, 2024
1 parent c9e11a9 commit d610ea9
Show file tree
Hide file tree
Showing 4 changed files with 85 additions and 57 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release-candidate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ permissions:

jobs:
check-version:
uses: fatihtokus/scan2html/.github/workflows/check-version.yml@migration-to-go
uses: fatihtokus/scan2html/.github/workflows/check-version.yml
build-front-end:
name: "Build front-end application"
runs-on: ubuntu-latest
Expand Down Expand Up @@ -71,6 +71,6 @@ jobs:
needs:
- check-version
- build-front-end
uses: fatihtokus/scan2html/.github/workflows/release-go.yml@migration-to-go
uses: fatihtokus/scan2html/.github/workflows/release-go.yml
with:
next-version: '${{ needs.check-version.outputs.next-version }}'
60 changes: 25 additions & 35 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,25 @@ name: Release

on:
push:
tags:
- "v*"
branches:
- main
paths:
- "plugin.yaml"

permissions:
contents: read
contents: write # For report_template.html creation
id-token: write # For cosign

jobs:
build:
check-version:
uses: fatihtokus/scan2html/.github/workflows/check-version.yml
build-front-end:
name: "Build front-end application"
runs-on: ubuntu-latest
permissions:
contents: write
needs: check-version
if: ${{ needs.check-version.outputs.next-version != '' }}
env:
reportTemplate: 'report_template.html'
steps:
Expand All @@ -34,9 +42,8 @@ jobs:
with:
working-directory: src/frontend-app

- name: Build project
- name: Build frontend project
run: |
pwd
cd src/frontend-app/
npm run build
Expand All @@ -56,34 +63,17 @@ jobs:
} >"$reportTemplate"
cat "$reportTemplate"
- name: Compress
run: tar -zcvf scan2html.tar.gz scan2html.sh "$reportTemplate" LICENSE plugin.yaml

- name: Install GPG
run: sudo apt-get install -y gnupg
- name: Configure GPG
run: |
mkdir -p ~/.gnupg
chmod 700 ~/.gnupg
echo "use-agent" > ~/.gnupg/gpg.conf
echo "pinentry-mode loopback" >> ~/.gnupg/gpg.conf
- name: Import GPG key
run: |
echo "${{ secrets.GPG_PRIVATE_KEY }}" | gpg --batch --yes --import
env:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}

- name: Sign the release file
run: |
gpg --batch --yes --pinentry-mode loopback --passphrase "${{ secrets.GPG_PASSPHRASE }}" --armor --detach-sign scan2html.tar.gz
env:
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}

- name: Release
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # v1
- name: Upload report_template.html
uses: actions/upload-artifact@v3
with:
files: |
scan2html.tar.gz
scan2html.tar.gz.asc
name: report-template
path: ${{ env.reportTemplate }}

release:
needs:
- check-version
- build-front-end
uses: fatihtokus/scan2html/.github/workflows/release-go.yml
with:
next-version: '${{ needs.check-version.outputs.next-version }}'
54 changes: 46 additions & 8 deletions plugin.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: "scan2html"
version: "0.3.8"
version: "0.3.9"
maintainer: fatihtokus
repository: github.com/fatihtokus/scan2html
summary: A Trivy plugin that scans and outputs the results to a single page app.
Expand All @@ -9,22 +9,60 @@ description: |-
trivy scan2html [-h,--help] command target filename
platforms:
- selector:
os: darwin
os: linux
arch: amd64
uri: https://github.com/fatihtokus/scan2html/releases/download/v0.3.8/scan2html_0.3.8_darwin-amd64.tar.gz
uri: https://github.com/fatihtokus/scan2html/releases/download/v0.3.9/scan2html_0.3.9_linux-amd64.tar.gz
bin: ./scan2html
- selector:
os: darwin
os: linux
arch: arm
uri: https://github.com/fatihtokus/scan2html/releases/download/v0.3.9/scan2html_0.3.9_linux-arm.tar.gz
bin: ./scan2html
- selector:
os: linux
arch: arm64
uri: https://github.com/fatihtokus/scan2html/releases/download/v0.3.8/scan2html_0.3.8__darwin-arm64.tar.gz
uri: https://github.com/fatihtokus/scan2html/releases/download/v0.3.9/scan2html_0.3.9_linux-arm64.tar.gz
bin: ./scan2html
- selector:
os: linux
arch: amd64
uri: https://github.com/fatihtokus/scan2html/releases/download/v0.3.8/scan2html_0.3.8__linux-amd64.tar.gz
arch: s390x
uri: https://github.com/fatihtokus/scan2html/releases/download/v0.3.9/scan2html_0.3.9_linux-s390x.tar.gz
bin: ./scan2html
- selector:
os: linux
arch: ppc64le
uri: https://github.com/fatihtokus/scan2html/releases/download/v0.3.9/scan2html_0.3.9_linux-ppc64le.tar.gz
bin: ./scan2html
- selector:
os: linux
arch: 386
uri: https://github.com/fatihtokus/scan2html/releases/download/v0.3.9/scan2html_0.3.9_linux-386.tar.gz
bin: ./scan2html

- selector:
os: darwin
arch: amd64
uri: https://github.com/fatihtokus/scan2html/releases/download/v0.3.9/scan2html_0.3.9_darwin-amd64.tar.gz
bin: ./scan2html
- selector:
os: darwin
arch: arm64
uri: https://github.com/fatihtokus/scan2html/releases/download/v0.3.8/scan2html_0.3.8__linux-arm64.tar.gz
uri: https://github.com/fatihtokus/scan2html/releases/download/v0.3.9/scan2html_0.3.9_darwin-arm64.tar.gz
bin: ./scan2html

- selector:
os: freebsd
arch: 386
uri: https://github.com/fatihtokus/scan2html/releases/download/v0.3.9/scan2html_0.3.9_freebsd-386.tar.gz
bin: ./scan2html
- selector:
os: freebsd
arch: amd64
uri: https://github.com/fatihtokus/scan2html/releases/download/v0.3.9/scan2html_0.3.9_freebsd-amd64.tar.gz
bin: ./scan2html

- selector:
os: windows
arch: amd64
uri: https://github.com/fatihtokus/scan2html/releases/download/v0.3.9/scan2html_0.3.9_windows-amd64.zip
bin: ./scan2html
24 changes: 12 additions & 12 deletions release-candidate/plugin.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: "scan2html"
version: "0.3.9-rc.37"
version: "0.3.9-rc.38"
maintainer: fatihtokus
repository: github.com/fatihtokus/scan2html
summary: A Trivy plugin that scans and outputs the results to a single page app.
Expand All @@ -12,58 +12,58 @@ platforms:
- selector:
os: linux
arch: amd64
uri: https://github.com/fatihtokus/scan2html/releases/download/v0.3.9-rc.37/scan2html_0.3.9-rc.37_linux-amd64.tar.gz
uri: https://github.com/fatihtokus/scan2html/releases/download/v0.3.9-rc.38/scan2html_0.3.9-rc.38_linux-amd64.tar.gz
bin: ./scan2html
- selector:
os: linux
arch: arm
uri: https://github.com/fatihtokus/scan2html/releases/download/v0.3.9-rc.37/scan2html_0.3.9-rc.37_linux-arm.tar.gz
uri: https://github.com/fatihtokus/scan2html/releases/download/v0.3.9-rc.38/scan2html_0.3.9-rc.38_linux-arm.tar.gz
bin: ./scan2html
- selector:
os: linux
arch: arm64
uri: https://github.com/fatihtokus/scan2html/releases/download/v0.3.9-rc.37/scan2html_0.3.9-rc.37_linux-arm64.tar.gz
uri: https://github.com/fatihtokus/scan2html/releases/download/v0.3.9-rc.38/scan2html_0.3.9-rc.38_linux-arm64.tar.gz
bin: ./scan2html
- selector:
os: linux
arch: s390x
uri: https://github.com/fatihtokus/scan2html/releases/download/v0.3.9-rc.37/scan2html_0.3.9-rc.37_linux-s390x.tar.gz
uri: https://github.com/fatihtokus/scan2html/releases/download/v0.3.9-rc.38/scan2html_0.3.9-rc.38_linux-s390x.tar.gz
bin: ./scan2html
- selector:
os: linux
arch: ppc64le
uri: https://github.com/fatihtokus/scan2html/releases/download/v0.3.9-rc.37/scan2html_0.3.9-rc.37_linux-ppc64le.tar.gz
uri: https://github.com/fatihtokus/scan2html/releases/download/v0.3.9-rc.38/scan2html_0.3.9-rc.38_linux-ppc64le.tar.gz
bin: ./scan2html
- selector:
os: linux
arch: 386
uri: https://github.com/fatihtokus/scan2html/releases/download/v0.3.9-rc.37/scan2html_0.3.9-rc.37_linux-386.tar.gz
uri: https://github.com/fatihtokus/scan2html/releases/download/v0.3.9-rc.38/scan2html_0.3.9-rc.38_linux-386.tar.gz
bin: ./scan2html

- selector:
os: darwin
arch: amd64
uri: https://github.com/fatihtokus/scan2html/releases/download/v0.3.9-rc.37/scan2html_0.3.9-rc.37_darwin-amd64.tar.gz
uri: https://github.com/fatihtokus/scan2html/releases/download/v0.3.9-rc.38/scan2html_0.3.9-rc.38_darwin-amd64.tar.gz
bin: ./scan2html
- selector:
os: darwin
arch: arm64
uri: https://github.com/fatihtokus/scan2html/releases/download/v0.3.9-rc.37/scan2html_0.3.9-rc.37_darwin-arm64.tar.gz
uri: https://github.com/fatihtokus/scan2html/releases/download/v0.3.9-rc.38/scan2html_0.3.9-rc.38_darwin-arm64.tar.gz
bin: ./scan2html

- selector:
os: freebsd
arch: 386
uri: https://github.com/fatihtokus/scan2html/releases/download/v0.3.9-rc.37/scan2html_0.3.9-rc.37_freebsd-386.tar.gz
uri: https://github.com/fatihtokus/scan2html/releases/download/v0.3.9-rc.38/scan2html_0.3.9-rc.38_freebsd-386.tar.gz
bin: ./scan2html
- selector:
os: freebsd
arch: amd64
uri: https://github.com/fatihtokus/scan2html/releases/download/v0.3.9-rc.37/scan2html_0.3.9-rc.37_freebsd-amd64.tar.gz
uri: https://github.com/fatihtokus/scan2html/releases/download/v0.3.9-rc.38/scan2html_0.3.9-rc.38_freebsd-amd64.tar.gz
bin: ./scan2html

- selector:
os: windows
arch: amd64
uri: https://github.com/fatihtokus/scan2html/releases/download/v0.3.9-rc.37/scan2html_0.3.9-rc.37_windows-amd64.zip
uri: https://github.com/fatihtokus/scan2html/releases/download/v0.3.9-rc.38/scan2html_0.3.9-rc.38_windows-amd64.zip
bin: ./scan2html

0 comments on commit d610ea9

Please sign in to comment.