🌐 Translated using Weblate (Chinese (Simplified)) #538
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
# SPDX-FileCopyrightText: Simon Schneegans <[email protected]> | |
# SPDX-License-Identifier: CC0-1.0 | |
name: Badges | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
update-badges: | |
name: Update Badges | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v2 | |
- name: Download cloc | |
run: sudo apt-get update -y && sudo apt-get install -y cloc | |
- name: Get the Numbers | |
run: | | |
echo "CODE_LINES=$(scripts/cloc.sh --loc)" >> $GITHUB_ENV | |
echo "COMMENT_LINES=$(scripts/cloc.sh --percentage)" >> $GITHUB_ENV | |
- name: Create Lines-of-Code-Badge | |
uses: schneegans/[email protected] | |
with: | |
auth: ${{ secrets.UPLOAD_BADGES }} | |
gistID: 8f6459c2417de7534f64d98360dde865 | |
filename: loc.json | |
label: Lines of Code | |
message: ${{ env.CODE_LINES }} | |
color: lightgrey | |
labelColor: 303030 | |
- name: Create Comments-Badge | |
uses: schneegans/[email protected] | |
with: | |
auth: ${{ secrets.UPLOAD_BADGES }} | |
gistID: 8f6459c2417de7534f64d98360dde865 | |
filename: comments.json | |
label: Comments | |
message: ${{ env.COMMENT_LINES }}% | |
valColorRange: ${{ env.COMMENT_LINES }} | |
maxColorRange: 50 | |
minColorRange: 0 | |
labelColor: 303030 |