-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (55 loc) · 1.7 KB
/
update.yaml
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: Update Repo
on:
schedule:
- cron: '0 1 1 * *'
workflow_dispatch:
jobs:
build:
permissions: write-all
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
- name: Generate ADSB Databases
run: |
python3 tools/make_airlines_db.py
python3 tools/make_icao24_db.py
- name: Download world map
run: |
sudo apt-get update
sudo apt-get install libvips libvips-dev -y
python3 -m pip install pyvips pillow
python3 tools/make_world_map_img.py
python3 tools/make_world_map_db.py
- name: Zip Up SD Card
run: |
cd sdcard
zip -r -9 ../sdcard.zip *
cd ..
- name: Get variables
id: vars
run: |
echo "::set-output name=date::$(date +'%Y-%m')"
echo "::set-output name=version::v$(date +'%Y.%m')"
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.vars.outputs.version }}
release_name: SDCard ${{ steps.vars.outputs.date }}
body: |
${{ steps.vars.outputs.date }}
draft: false
prerelease: false
- name: Upload SD Card Assets
id: upload-sd-card-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./sdcard.zip
asset_name: sdcard-${{ steps.vars.outputs.date }}.zip
asset_content_type: application/zip