This repository has been archived by the owner on Jul 14, 2023. It is now read-only.
Bump http from 0.13.5 to 0.13.6 #18
Workflow file for this run
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: Pana Analysis | |
on: [push, pull_request, workflow_dispatch] | |
jobs: | |
package-analysis: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: axel-op/dart-package-analyzer@v3 | |
# set an id for the current step | |
id: analysis | |
with: | |
githubToken: ${{ secrets.GITHUB_TOKEN }} | |
# You can then use this id to retrieve the outputs in the next steps. | |
# The following step shows how to exit the workflow with an error if the total score in percentage is below 50: | |
- name: Check scores | |
env: | |
# NB: "analysis" is the id set above. Replace it with the one you used if different. | |
TOTAL: ${{ steps.analysis.outputs.total }} | |
TOTAL_MAX: ${{ steps.analysis.outputs.total_max }} | |
run: | | |
PERCENTAGE=$(( $TOTAL * 100 / $TOTAL_MAX )) | |
if (( $PERCENTAGE < 50 )) | |
then | |
echo Score too low! | |
exit 1 | |
fi | |
# This step is useful for PR's coming from forks. It takes the raw JSON and formats a report from it. | |
- name: Check scores | |
env: | |
JSON_OUTPUT: ${{ steps.analysis.outputs.json_output }} | |
run: | | |
TOTAL_SCORE=$(jq -r '.scores.grantedPoints' <<< "$JSON_OUTPUT") |