Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PR-Test 2 for Eco-CI #2

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
58 changes: 56 additions & 2 deletions .github/workflows/scorecard.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ on:
schedule:
# Weekly on Mondays at 00:00.
- cron: '0 0 * * 1'
workflow_dispatch:
pull_request:


# The OSSF recommendation encourages to enable branch protection rules trigger
# to update the scorecard
Expand All @@ -20,7 +23,6 @@ on:
push:
branches: [ "master" ]

# Declare default permissions as read only.
permissions: read-all

jobs:
Expand All @@ -35,13 +37,30 @@ jobs:
# Uncomment the permissions below if installing in a private repository.
# contents: read
# actions: read
pull-requests: write

steps:

- name: Eco CI Energy Estimation - Initialize
uses: green-coding-solutions/eco-ci-energy-estimation@main
with:
task: start-measurement
continue-on-error: true


- name: "Checkout code"
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
with:
persist-credentials: false

- name: Eco CI Energy Estimation - Get Measurement
uses: green-coding-solutions/eco-ci-energy-estimation@main
with:
task: get-measurement
label: Checkout code
continue-on-error: true


- name: "Run analysis"
uses: ossf/scorecard-action@e38b1902ae4f44df626f11ba0734b14fb91f8f86 # v2.1.2
with:
Expand All @@ -60,7 +79,16 @@ jobs:
# For private repositories:
# - `publish_results` will always be set to `false`, regardless
# of the value entered here.
publish_results: true
publish_results: false

- name: Eco CI Energy Estimation - Get Measurement
uses: green-coding-solutions/eco-ci-energy-estimation@main
with:
task: get-measurement
label: Run analysis
continue-on-error: true



# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
# format to the repository Actions tab.
Expand All @@ -71,9 +99,35 @@ jobs:
path: results.sarif
retention-days: 5

- name: Eco CI Energy Estimation - Get Measurement
uses: green-coding-solutions/eco-ci-energy-estimation@main
with:
task: get-measurement
label: Upload artifact
continue-on-error: true



# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@17573ee1cc1b9d061760f3a006fc4aac4f944fd5 # v2.2.4
with:
sarif_file: results.sarif

- name: Eco CI Energy Estimation - Get Measurement
uses: green-coding-solutions/eco-ci-energy-estimation@main
with:
task: get-measurement
label: Upload to code-scanning
continue-on-error: true



- name: Eco CI Energy Estimation - End Measurement
uses: green-coding-solutions/eco-ci-energy-estimation@main
with:
task: display-results
pr-comment: true
continue-on-error: true


Loading