Skip to content

Commit

Permalink
add images
Browse files Browse the repository at this point in the history
  • Loading branch information
shawnchainw committed Apr 15, 2024
1 parent 9dc219e commit da7b35e
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 28 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Scheduled Rules

on:
# schedule:
# - cron: '1 0 * * *'
push:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: main
path: main
- uses: actions/checkout@v4
with:
ref: page
path: page
- name: Run rules
run: python main/build.py > page/test/data.json

- name: Change working directory
run: cd page

- name: Push
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add test/data.json
git commit -m "Auto Build"
git push
24 changes: 0 additions & 24 deletions .github/workflows/schedule.yml

This file was deleted.

4 changes: 2 additions & 2 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def convert_bytes(bytes, decimals=2):
return f'{bytes:.{decimals}f} {units[i]}'


root = 'products'
root = os.path.join(os.path.dirname(__file__), 'products')

with open(os.path.join(root, 'config.json')) as f:
imager_config = json.load(f)
Expand Down Expand Up @@ -72,4 +72,4 @@ def convert_bytes(bytes, decimals=2):
serial_data['data'] = sorted(serial_data['data'], key=lambda x: x['sort'], reverse=False)

result['devices'] = sorted(result['devices'], key=lambda x: x['sort'], reverse=False)
print(json.dumps(result, indent=4))
print(json.dumps(result, indent=4), flush=True)
2 changes: 1 addition & 1 deletion get_file_size.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"checksum_url": ver,
"extension": "xz",
"download_url": url,
'sort':'0'
'sort': '0'
}

print(json.dumps(_json, indent=4))
2 changes: 1 addition & 1 deletion products/config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"latest": "v0.2.2",
"latest": "v0.3.0",
"minimumVersion": "v0.2.1",
"download_url": "https://imager.radxa.com"
}

0 comments on commit da7b35e

Please sign in to comment.