-
Notifications
You must be signed in to change notification settings - Fork 30
37 lines (30 loc) · 944 Bytes
/
count.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: Count Files and Publish to badge-info
on:
push:
branches:
- main
permissions:
contents: write
jobs:
count_files_and_publish_to_badgeinfo:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Count files in wallet folder
id: file_count
run: |
file_count=$(find wallets -type f | wc -l)
echo "wallet-count=$file_count" >> $GITHUB_OUTPUT
- name: Create JSON file
run: |
mkdir values
echo "{ \"schemaVersion\": 1, \"label\": \"Wallets\", \"message\": \"${{ steps.file_count.outputs.wallet-count }}\", \"color\": \"green\" }" > values/wallets.json
# Deploy to local repo
- name: Deploy
uses: s0/git-publish-subdir-action@develop
env:
REPO: self
BRANCH: badge-info
FOLDER: values
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}