Skip to content

Show number of new findings for OSH scans #482

Show number of new findings for OSH scans

Show number of new findings for OSH scans #482

Workflow file for this run

### WARNING -- this file was generated by mf
### and stolen from https://github.com/patternfly/patternfly/blob/v5/.github/workflows/pr-preview.yml
name: Deploy PR previews
on:
pull_request_target:
workflow_dispatch:
inputs:
pr_id:
description: PR ID to be deployed to the surge.sh
required: true
default: "0"
concurrency: preview-${{ github.ref }}
jobs:
deploy-preview:
runs-on: ubuntu-latest
env:
DOMAIN: packit-dashboard-pr-${{ github.event.inputs.pr_id || github.event.number }}.surge.sh
GH_PR_NUM: ${{ github.event.inputs.pr_id || github.event.number }}
steps:
- name: Checkout the repository
uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 9
run_install: false
- uses: actions/setup-node@v4
with:
node-version: "20"
cache: "pnpm"
cache-dependency-path: pnpm-lock.yaml
# Yes, we really need to get the PR changes
- name: Get the PR changes
run: git fetch origin pull/$GH_PR_NUM/head:tmp
- name: List the PR changes
run: |
git rev-parse origin/main
git rev-parse HEAD
git rev-parse tmp
git log origin/main..tmp --format="%b"
- name: Merge the changes with the ‹main›
run: git merge --no-edit tmp
- name: Check out the script from the ‹main› branch
run: git checkout origin/main .github/notify.py
- name: Install and Build
run: |
(cd frontend && pnpm install);
make .install-logos
API_URL="https://prod.packit.dev/api" make transpile-prod
- name: Install deploy dependencies
run: pnpm add --global surge
- name: Deploy the dashboard to surge.sh
run: surge ./frontend/dist $DOMAIN --token ${{ secrets.SURGE_TOKEN }}
env:
SURGE_TOKEN: ${{ secrets.SURGE_TOKEN }}
- name: Install ‹ogr›, cause why not
run: python3 -m pip install ogr
- name: Notify PR about the deployment
run: python3 .github/notify.py $DOMAIN
env:
GH_PR_TOKEN: ${{ secrets.RELEASEBOT_GITHUB_TOKEN }}