Skip to content

OSS Review Toolkit

OSS Review Toolkit #12

Workflow file for this run

on:
schedule:
- cron: "0 0 1 * *" # at 00:00 on day-of-month 1
workflow_dispatch: # for manual run
name: 'OSS Review Toolkit'
jobs:
ort:
name: 'ORT'
runs-on: ubuntu-latest
env:
OSO_PROJECT_NAME: porsche_design_system
OSO_AWS_ECR_REGISTRY: 215495424956.dkr.ecr.eu-central-1.amazonaws.com
PDS_DOCKER_IMAGE: ghcr.io/chbinousamy/porsche-design-system/playwright:v1.39.0-focal-test
steps:
- name: 'Checkout'
uses: actions/checkout@v3
- name: 'Cache node_modules'
uses: actions/cache@v3
id: cache
with:
path: '**/node_modules'
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
- name: 'Login to GitHub Container Registry'
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: 'Pull Docker Image'
run: docker pull ${{ env.PDS_DOCKER_IMAGE }}
- name: 'Install'
if: steps.cache.outputs.cache-hit != 'true'
uses: ./.github/actions/docker-run-playwright
with:
entrypoint: run-install
- name: 'Production Builds'
uses: ./.github/actions/docker-run-playwright
with:
entrypoint: run-build-prod
- name: "Login to AWS ECR"
uses: docker/login-action@v2
with:
registry: ${{ env.OSO_AWS_ECR_REGISTRY }}
username: ${{ secrets.OSO_AWS_ACCESS_KEY_ID }}
password: ${{ secrets.OSO_AWS_SECRET_ACCESS_KEY }}
- name: "Run ORT"
run: |
docker run --user root -v "$PWD":/project ${{ env.OSO_AWS_ECR_REGISTRY }}/ort-porsche:latest analyze -i /project -o /project/ort
docker run --user root -v "$PWD":/project ${{ env.OSO_AWS_ECR_REGISTRY }}/ort-porsche:latest report -i /project/ort/analyzer-result.yml -o /project/ort -f StaticHtml
shell: bash
- name: 'Store ORT Analysis'
uses: actions/upload-artifact@v3
with:
name: ort-analysis
path: ./ort
- name: "Send ORT Analyzer Result to OSO"
run: |
zip -j analyzer-result.zip ort/analyzer-result.yml
curl -X POST https://${{ env.OSO_JENKINS_USER }}:${{ env.OSO_JENKINS_TOKEN }}@oso-ort-scan.aws.platform.porsche-preview.cloud/job/ort-porsche-scancode/buildWithParameters --form ort/[email protected] --form ProjectName=${{ env.OSO_PROJECT_NAME }} --fail
shell: bash
env:
OSO_JENKINS_USER: ${{ secrets.OSO_JENKINS_USER }}
OSO_JENKINS_TOKEN: ${{ secrets.OSO_JENKINS_TOKEN }}