Files
charts/.github/workflows/daily.yaml
Alfred Göppel 936f78cfd3 fix(cli): Change Actions to run on default group (#40102)
**Description**
<!--
Please include a summary of the change and which issue is fixed. Please
also include relevant motivation and context. List any dependencies that
are required for this change.
-->
⚒️ Fixes  # <!--(issue)-->

**⚙️ Type of change**

- [ ] ⚙️ Feature/App addition
- [ ] 🪛 Bugfix
- [ ] ⚠️ Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [x] 🔃 Refactor of current code
- [ ] 📜 Documentation Changes

**🧪 How Has This Been Tested?**
<!--
Please describe the tests that you ran to verify your changes. Provide
instructions so we can reproduce. Please also list any relevant details
for your test configuration
-->

**📃 Notes:**
<!-- Please enter any other relevant information here -->

**✔️ Checklist:**

- [ ] ⚖️ My code follows the style guidelines of this project
- [ ] 👀 I have performed a self-review of my own code
- [ ] #️⃣ I have commented my code, particularly in hard-to-understand
areas
- [ ] 📄 I have made changes to the documentation
- [ ] 🧪 I have added tests to this description that prove my fix is
effective or that my feature works
- [ ] ⬆️ I increased versions for any altered app according to semantic
versioning
- [x] I made sure the title starts with `feat(chart-name):`,
`fix(chart-name):`, `chore(chart-name):`, `docs(chart-name):` or
`fix(docs):`

** App addition**

If this PR is an app addition please make sure you have done the
following.

- [ ] 🖼️ I have added an icon in the Chart's root directory called
`icon.png`

---

_Please don't blindly check all the boxes. Read them and only check
those that apply.
Those checkboxes are there for the reviewer to see what is this all
about and
the status of this PR with a quick glance._

---------

Signed-off-by: Alfred Göppel <43101280+alfi0812@users.noreply.github.com>
2025-09-27 23:45:08 +02:00

159 lines
5.0 KiB
YAML

name: "Chore: Daily Tasks"
on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
permissions:
issues: write
pull-requests: write
concurrency:
group: lock
jobs:
generate-readme:
runs-on:
group: default
name: "Generate readme files"
steps:
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
with:
token: ${{ secrets.OR_PAT }}
fetch-depth: 1
- name: Setting repo parent dir as safe safe.directory
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6
with:
go-version: stable
cache: true
cache-dependency-path: |
**/go.mod
**/go.sum
- name: Install ./clustertool
shell: bash
run: |
VERSION="2.0.6"
FILENAME="clustertool_${VERSION}_linux_amd64.tar.gz"
URL="https://github.com/trueforge-org/truecharts/releases/download/v${VERSION}/${FILENAME}"
mkdir -p temp
cd temp
# Download the archive
curl -L -o "$FILENAME" "$URL"
# Extract the archive
tar -xzf "$FILENAME"
cd ..
- name: Transcode icons to webp
shell: bash
run: |
# Find all files named icon.* in all subfolders and transcode to webp
find . -type f -name 'icon.*' | while read -r FILE
do
DIR=$(dirname "$FILE") # get the directory of the current file
EXT=${FILE##*.} # file extension
QUALITY=75 # quality for the image
# Transcode to icon.webp
if [[ "$EXT" != "webp" && ! -f "${DIR}/icon.webp" ]]; then
echo "converting file to icon.webp: $FILE"
cwebp -resize 150 150 -m 6 -mt -q $QUALITY "$FILE" -o "${FILE/%.$EXT/.webp}" &>/dev/null || echo "transcode failed for icon.webp"
fi
# Transcode to icon-small.webp
if [[ "$EXT" != "webp" && ! -f "${DIR}/icon-small.webp" ]]; then
echo "converting file to icon-small.webp: $FILE"
cwebp -resize 32 32 -m 6 -mt -q $QUALITY "$FILE" -o "${DIR}/icon-small.webp" &>/dev/null || echo "transcode failed for icon-small.webp"
fi
# Remove the original file if it's not a .webp file after both transcodes
if [[ "$EXT" != "webp" ]]; then
rm "$FILE"
fi
done
- name: Fix Fixable Pre-Commit issues
shell: bash
run: |
echo "Running pre-commit test-and-cleanup..."
pre-commit run --all ||:
# Fix sh files to always be executable
find . -name '*.sh' | xargs chmod +x
# Clean up chart.yaml after pre-commit changes
# Avoids un-needed git diff changes, due to quoting and array ordering
- name: Fix Chart.yaml
shell: bash
run: |
./temp/clustertool charts genmeta
- name: Ensure Go Mod Tidy
run: |
cd ./clustertool
go mod tidy
cd ..
- name: Cleanup
run: |
rm -rf changes.json
rm -rf master
- name: Commit changes
run: |
git config user.name "TrueCharts-Bot"
git config user.email "bot@truecharts.org"
git pull
git add --all
git commit -sm "Commit daily changes" || exit 0
git push
lock-threads:
runs-on:
group: default
steps:
- uses: dessant/lock-threads@1bf7ec25051fe7c00bdd17e6a7cf3d7bfb7dc771 # v5
with:
github-token: ${{ secrets.BOT_TOKEN }}
issue-inactive-days: "7"
exclude-any-issue-labels: ""
issue-comment: "This issue is locked to prevent necro-posting on closed issues. Please create a new issue or contact staff on discord of the problem persists"
issue-lock-reason: ""
pr-inactive-days: "7"
pr-comment: "This PR is locked to prevent necro-posting on closed PRs. Please create a issue or contact staff on discord if you want to further discuss this"
pr-lock-reason: "resolved"
log-output: true
# check-contributors:
# name: Check Contributors
# runs-on:
# group: default
# steps:
# - name: Checkout
# uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4
# with:
# token: ${{ secrets.BOT_TOKEN }}
# repository: truecharts/charts
# fetch-depth: 110
#
# - uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4
# with:
# node-version: 18
#
# - uses: borales/actions-yarn@3766bb1335b98fb13c60eaf358fe20811b730a88 # v5.0.0
# with:
# cmd: install --frozen-lockfile
#
# - name: List missing and unknown contributors
# env:
# PRIVATE_TOKEN: ${{ secrets.BOT_TOKEN }}
# run: |
# awk -F', ' '{ for( i=1; i<=NF; i++ ) print $i }' <<<$(yarn all-contributors check)