OSS Review Toolkit #13
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
on: | |
schedule: | |
- cron: "0 0 1 * *" # at 00:00 on day-of-month 1 | |
workflow_dispatch: # enables manual run, - before manual run is triggered ensure step "Send ORT Analyzer Result to OSO" is disabled / commented out | |
name: 'OSS Review Toolkit' | |
env: | |
OSO_PROJECT_NAME: porsche_design_system | |
OSO_AWS_ECR_REGISTRY: 936427553375.dkr.ecr.eu-central-1.amazonaws.com | |
PDS_PLAYWRIGHT_DOCKER_IMAGE: ghcr.io/chbinousamy/porsche-design-system/playwright:v1.49.1-jammy-3 | |
jobs: | |
ort: | |
name: 'ORT' | |
runs-on: ubuntu-latest | |
steps: | |
- name: 'Checkout' | |
uses: actions/checkout@v4 | |
- name: 'Setup and install' | |
uses: ./.github/actions/setup-and-install | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: 'Production Builds' | |
uses: ./.github/actions/docker-run-playwright | |
with: | |
entrypoint: run-build-prod | |
- name: "Login to AWS ECR" | |
uses: docker/login-action@v3 | |
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:latest analyze -i /project -o /project/ort | |
docker run --user root -v "$PWD":/project ${{ env.OSO_AWS_ECR_REGISTRY }}/ort:latest report -i /project/ort/analyzer-result.yml -o /project/ort -f StaticHtml | |
shell: bash | |
- name: 'Store ORT Analysis' | |
uses: actions/upload-artifact@v4 | |
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 }}@scanning-environment.opensourceofficeprod.aws.platform.porsche.cloud/job/ort-porsche-scancode/buildWithParameters --form ort/analyzer-result.zip=@analyzer-result.zip --form ProjectName=${{ env.OSO_PROJECT_NAME }} --fail | |
shell: bash | |
env: | |
OSO_JENKINS_USER: ${{ secrets.OSO_JENKINS_USER }} | |
OSO_JENKINS_TOKEN: ${{ secrets.OSO_JENKINS_TOKEN }} |