Moving README generation into its own workflow.
Renovate / renovate (push) Successful in 8m49s

This commit is contained in:
2025-10-05 21:26:50 -04:00
parent c1b9adc2c6
commit 00c7c92098
3 changed files with 62 additions and 117 deletions
@@ -0,0 +1,62 @@
name: List of Services README Generation
on:
schedule:
- cron: 30 */2 * * *
workflow_dispatch:
jobs:
readme-services:
name: Generate Services List
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
- name: Install yq
uses: dcarbone/install-yq-action@4075b4dca348d74bd83f2bf82d30f25d7c54539b # v1.3.1
- name: Find docker-compose YAML files
id: find-compose-files
run: |
COMPOSE_FILES=$(find . -type f -name "docker-compose*.yml" \
-a ! -name "*windows*" \
-a ! -name "*gui*" \
-a ! -name "*macos*" \
-a ! -name "*hivemind*" \
-a ! -name "*server*" \
| sort)
echo "compose_files=$COMPOSE_FILES" >> "$GITHUB_OUTPUT"
echo "Found Compose files:"
echo "$COMPOSE_FILES"
- name: Generate combined service list
run: |
echo "[]" > combined_services.json
for f in ${{ steps.find-compose-files.outputs.compose_files }}; do
echo "Processing $f"
yq '.services | to_entries | map({"service": .key, "image": .value.image})' "$f" \
>> temp_services.json
done
# Merge all service arrays into one
jq -s add temp_services.json | jq 'unique_by(.service)' > services.json
- name: Generate Markdown Table
uses: gazab/create-markdown-table@6686233d7008e8d8b9d4bbdbfd1fb1ae510019f0 # v1.0.7
id: service-table
with:
file: ./services.json
- name: Regenerate README
run: |
echo "# List of Services" > README.md
echo -e "\n\n" >> README.md
echo "${{ steps.service-table.outputs.table }}" >> README.md
- name: Add/Commit README.md
id: commit-readme
uses: EndBug/add-and-commit@a94899bca583c204427a224a7af87c02f9b325d5 # v9.1.4
with:
message: "chore: Update README"
add: "README.md"
-72
View File
@@ -244,78 +244,6 @@ jobs:
notification_title: "GITEA: Docker Compose Dry Run @ Benedikta"
notification_message: "Docker Compose dry run completed successfully."
regenerate-readme-modified-services:
name: Update README & Generate List of Modified Services
runs-on: ubuntu-latest
needs: [docker-compose-dry-run]
steps:
- name: Checkout
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
- name: Install yq
uses: dcarbone/install-yq-action@4075b4dca348d74bd83f2bf82d30f25d7c54539b # v1.3.1
- name: Gotify Notification
uses: eikendev/gotify-action@master
with:
gotify_api_base: "${{ secrets.RUNNER_GOTIFY_URL }}"
gotify_app_token: "${{ secrets.RUNNER_GOTIFY_TOKEN }}"
notification_title: "GITEA: README Update"
notification_message: "Updating README..."
- name: Find docker-compose YAML files
id: find-compose-files
run: |
COMPOSE_FILES=$(find . -type f -name "docker-compose*.yml" \
-a ! -name "*windows*" \
-a ! -name "*gui*" \
-a ! -name "*macos*" \
-a ! -name "*hivemind*" \
-a ! -name "*server*" \
| sort)
echo "compose_files=$COMPOSE_FILES" >> "$GITHUB_OUTPUT"
echo "Found Compose files:"
echo "$COMPOSE_FILES"
- name: Generate combined service list
run: |
echo "[]" > combined_services.json
for f in ${{ steps.find-compose-files.outputs.compose_files }}; do
echo "Processing $f"
yq '.services | to_entries | map({"service": .key, "image": .value.image})' "$f" \
>> temp_services.json
done
# Merge all service arrays into one
jq -s add temp_services.json | jq 'unique_by(.service)' > services.json
- name: Generate Markdown Table
uses: gazab/create-markdown-table@6686233d7008e8d8b9d4bbdbfd1fb1ae510019f0 # v1.0.7
id: service-table
with:
file: ./services.json
- name: Regenerate README
run: |
echo "# List of Services" > README.md
echo -e "\n\n" >> README.md
echo "${{ steps.service-table.outputs.table }}" >> README.md
- name: Add/Commit README.md
id: commit-readme
uses: EndBug/add-and-commit@a94899bca583c204427a224a7af87c02f9b325d5 # v9.1.4
with:
message: "chore: Update README"
add: "README.md"
- name: Gotify Notification
uses: eikendev/gotify-action@master
with:
gotify_api_base: "${{ secrets.RUNNER_GOTIFY_URL }}"
gotify_app_token: "${{ secrets.RUNNER_GOTIFY_TOKEN }}"
notification_title: "GITEA: README Update"
notification_message: "README updated"
pr-merge:
name: PR Merge
needs: [generate-service-list, docker-compose-dry-run]
-45
View File
@@ -25,51 +25,6 @@ jobs:
- name: Check out code
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
- name: Find docker-compose YAML files
id: find-compose-files
run: |
COMPOSE_FILES=$(find . -type f -name "docker-compose*.yml" \
-a ! -name "*windows*" \
-a ! -name "*gui*" \
-a ! -name "*macos*" \
-a ! -name "*hivemind*" \
-a ! -name "*server*" \
| sort)
echo "compose_files=$COMPOSE_FILES" >> "$GITHUB_OUTPUT"
echo "Found Compose files:"
echo "$COMPOSE_FILES"
- name: Generate combined service list
run: |
echo "[]" > combined_services.json
for f in ${{ steps.find-compose-files.outputs.compose_files }}; do
echo "Processing $f"
yq '.services | to_entries | map({"service": .key, "image": .value.image})' "$f" \
>> temp_services.json
done
# Merge all service arrays into one
jq -s add temp_services.json | jq 'unique_by(.service)' > services.json
- name: Generate Markdown Table
uses: gazab/create-markdown-table@6686233d7008e8d8b9d4bbdbfd1fb1ae510019f0 # v1.0.7
id: service-table
with:
file: ./services.json
- name: Regenerate README
run: |
echo "# List of Services" > README.md
echo -e "\n\n" >> README.md
echo "${{ steps.service-table.outputs.table }}" >> README.md
- name: Add/Commit README.md
id: commit-readme
uses: EndBug/add-and-commit@a94899bca583c204427a224a7af87c02f9b325d5 # v9.1.4
with:
message: "chore: Update README"
add: "README.md"
- name: Get changed services from all Compose files.
id: services
run: |