Merge pull request #4171 from ty-dc/fix/failed-to-install-openvswitch #687
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: Badge Status | |
env: | |
CODESTATUSSCRIPT: "./tools/scripts/codeCoverage.sh" | |
E2ESTATUSSCRIPT: "./tools/scripts/e2ecover.sh" | |
TODOSCRIPT: "./tools/scripts/todocover.sh" | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
update-badges: | |
name: Update Badges | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Download cloc | |
run: sudo apt-get update -y && sudo apt-get install -y cloc | |
- name: Get the Numbers | |
shell: bash | |
run: | | |
TOOL_PATH=${{ env.CODESTATUSSCRIPT }} | |
CODE_LINES=$( ${TOOL_PATH} --code-lines ) | |
COMMENT_PERCENTAGE=$( ${TOOL_PATH} --comment-percent ) | |
echo "CODE_LINES=${CODE_LINES}" >> $GITHUB_ENV | |
echo "COMMENT_PERCENTAGE=${COMMENT_PERCENTAGE}" >> $GITHUB_ENV | |
TOOL_PATH=${{ env.E2ESTATUSSCRIPT }} | |
E2E_STATUS=$( ${TOOL_PATH} ) | |
echo "E2E_STATUS=${E2E_STATUS}" >> $GITHUB_ENV | |
TOOL_PATH=${{ env.TODOSCRIPT }} | |
TODO_STATUS=$( ${TOOL_PATH} ) | |
echo "TODO_STATUS=${TODO_STATUS}" >> $GITHUB_ENV | |
- name: Create Lines-of-Code-Badge | |
uses: schneegans/[email protected] | |
with: | |
auth: ${{ secrets.WELAN_PAT }} | |
gistID: 7e54bfe38fec206e7710c74ad55a5139 | |
filename: spiderpoolcodeline.json | |
label: Code Lines | |
message: ${{ env.CODE_LINES }} | |
color: lightgrey | |
- name: Create Comments-Badge | |
uses: schneegans/[email protected] | |
with: | |
auth: ${{ secrets.WELAN_PAT }} | |
gistID: 93b7ba26a4600fabe100ff640f9b3bd3 | |
filename: spiderpoolcomment.json | |
label: Comments | |
message: ${{ env.COMMENT_PERCENTAGE }}% | |
valColorRange: ${{ env.COMMENT_PERCENTAGE }} | |
maxColorRange: 100 | |
minColorRange: 0 | |
- name: Create E2E-Badge | |
uses: schneegans/[email protected] | |
with: | |
auth: ${{ secrets.WELAN_PAT }} | |
gistID: e1d3c092d1b9f61f1c8e36f09d2809cb | |
filename: spiderpoole2e.json | |
label: e2e cover | |
message: ${{ env.E2E_STATUS }} | |
color: lightgrey | |
- name: Create TODO-Badge | |
uses: schneegans/[email protected] | |
with: | |
auth: ${{ secrets.WELAN_PAT }} | |
gistID: cd9ef69f5ba8724cb4ff896dca953ef4 | |
filename: spiderpooltodo.json | |
label: todo | |
message: ${{ env.TODO_STATUS }} | |
color: lightgrey |