Removing OS info for now.
This commit is contained in:
@@ -1,67 +1,35 @@
|
|||||||
name: List of Services README Generation
|
name: List of Services README Generation
|
||||||
|
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: 30 */2 * * *
|
- cron: 30 */2 * * *
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
readme-services:
|
readme-services:
|
||||||
name: Generate Services List
|
name: Generate Services List
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
steps:
|
- name: Checkout
|
||||||
- name: Checkout
|
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
|
||||||
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
|
with:
|
||||||
with:
|
ref: 'main'
|
||||||
ref: main
|
- name: Install yq
|
||||||
|
uses: dcarbone/install-yq-action@4075b4dca348d74bd83f2bf82d30f25d7c54539b # v1.3.1
|
||||||
- name: Generate system info (ANSI preserved)
|
- name: Generate service list
|
||||||
id: gen-sysinfo
|
run: |
|
||||||
uses: appleboy/ssh-action@91f3272fc5907f4699dcf59761eb622a07342f5a # v1.2.3
|
yq 'explode(.) | .services | to_entries | map({"service": .key, "image": (.value.image | sub("@sha256:.*$"; "")), "description": (.value.labels."homepage.description" // "")})' docker-compose.yml > services.yml
|
||||||
with:
|
- name: Generate Markdown Table
|
||||||
host: 192.168.1.254
|
uses: gazab/create-markdown-table@6686233d7008e8d8b9d4bbdbfd1fb1ae510019f0 # v1.0.7
|
||||||
username: charish
|
id: service-table
|
||||||
port: 22
|
with:
|
||||||
key: ${{ secrets.RUNNER_SSH_PRIVATE_KEY }}
|
file: ./services.yml
|
||||||
capture_stdout: true
|
- name: Regenerate README
|
||||||
script: neofetch
|
run: |
|
||||||
|
echo "# List of Services" > README.md
|
||||||
- name: Convert ANSI to HTML
|
echo -e "\n\n" >> README.md
|
||||||
id: ansi-to-html
|
echo "${{ steps.service-table.outputs.table }}" >> README.md
|
||||||
uses: https://git.trez.wtf/Trez/actions-ansi-to-html@pre-bundle-dependencies_2025-11-11T06-51-37
|
- name: Add/Commit README.md
|
||||||
with:
|
id: commit-readme
|
||||||
input: ${{ steps.gen-sysinfo.outputs.stdout }}
|
uses: EndBug/add-and-commit@a94899bca583c204427a224a7af87c02f9b325d5 # v9.1.4
|
||||||
# run: |
|
with:
|
||||||
# echo "${{ steps.gen-sysinfo.outputs.stdout }}" > sysinfo.ansi
|
message: "chore: Update README"
|
||||||
# cat sysinfo.ansi | aha --black > sysinfo.html
|
add: "README.md"
|
||||||
|
|
||||||
- name: Generate service list
|
|
||||||
run: |
|
|
||||||
yq 'explode(.) | .services | to_entries | map({"service": .key, "image": (.value.image | sub("@sha256:.*$"; "")), "description": (.value.labels."homepage.description" // "")})' docker-compose.yml > services.yml
|
|
||||||
|
|
||||||
- name: Generate Markdown Table
|
|
||||||
uses: gazab/create-markdown-table@6686233d7008e8d8b9d4bbdbfd1fb1ae510019f0 # v1.0.7
|
|
||||||
id: service-table
|
|
||||||
with:
|
|
||||||
file: ./services.yml
|
|
||||||
|
|
||||||
- name: Regenerate README
|
|
||||||
run: |
|
|
||||||
{
|
|
||||||
echo "# System Info"
|
|
||||||
echo ""
|
|
||||||
echo '<details><summary>View Neofetch Output</summary>'
|
|
||||||
echo "${{ steps.ansi-to-html.outputs.contents }}"
|
|
||||||
echo '</details>'
|
|
||||||
echo ""
|
|
||||||
echo "# List of Services"
|
|
||||||
echo ""
|
|
||||||
echo "${{ steps.service-table.outputs.table }}"
|
|
||||||
} > README.md
|
|
||||||
|
|
||||||
- name: Add/Commit README.md
|
|
||||||
uses: EndBug/add-and-commit@a94899bca583c204427a224a7af87c02f9b325d5 # v9.1.4
|
|
||||||
with:
|
|
||||||
message: "chore: Update README"
|
|
||||||
add: "README.md"
|
|
||||||
Reference in New Issue
Block a user