Update Repo #34
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |