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-Candidate | |
on: | |
push: | |
branches: | |
- migration-to-go | |
paths: | |
- "release-candidate/plugin.yaml" | |
permissions: | |
contents: write # For report_template.html creation | |
id-token: write # For cosign | |
jobs: | |
check-version: | |
uses: fatihtokus/scan2html/.github/workflows/check-version.yml@migration-to-go | |
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: | |
- name: Harden Runner | |
uses: step-security/harden-runner@0d381219ddf674d61a7572ddd19d7941e271515c # v2.9.0 | |
with: | |
egress-policy: audit | |
- name: Checkout repo | |
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 | |
- name: Setup Node | |
uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # v3.8.2 | |
with: | |
working-directory: src/frontend-app | |
- name: Install dependencies | |
uses: bahmutov/npm-install@e5c7e14408aa6089501de32bd16123b41738047e # v1.10.2 | |
with: | |
working-directory: src/frontend-app | |
- name: Build frontend project | |
run: | | |
cd src/frontend-app/ | |
npm run build | |
- name: Preparing report_template.html | |
run: | | |
{ | |
head -n -4 'src/frontend-app/dist/src/assets/app-template.html' | |
echo '' | |
cat 'src/frontend-app/dist/app.js' | |
echo '' | |
echo '</script>' | |
echo '</body>' | |
echo '</html>' | |
} >"$reportTemplate" | |
cat "$reportTemplate" | |
- name: Upload report_template.html | |
uses: actions/upload-artifact@v3 | |
with: | |
name: report-template | |
path: ${{ env.reportTemplate }} | |
release: | |
needs: | |
- check-version | |
- build-front-end | |
uses: fatihtokus/scan2html/.github/workflows/release-go.yml@migration-to-go | |
with: | |
next-version: '${{ needs.check-version.outputs.next-version }}' |