Skip to content

Export to SQLite

Export to SQLite #138

Workflow file for this run

name: Export to SQLite
on:
- workflow_dispatch
jobs:
export_ace_world_patches:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Install datasette
run: python3 -m pip install datasette
- name: Install db-to-sqlite from my fork
run: python3 -m pip install "db-to-sqlite @ git+https://github.com/amoeba/db-to-sqlite#egg=db-to-sqlite[mysql]"
- name: Start MySQL
run: sudo systemctl start mysql.service
- name: Download release
uses: robinraju/release-downloader@v1.7
with:
repository: ACEmulator/ACE-World-16PY-Patches
latest: true
fileName: ACE.World*.zip
- name: Decompress
run: find . -iname "ACE-World*.zip" -exec unzip {} \;
- name: Load SQL
run: sh scripts/load.sh
- name: Export
run: db-to-sqlite --all mysql://root:root@localhost/ace_world ace_world_patches.db
- uses: actions/upload-artifact@v3
with:
name: ace_world_patches
path: ./ace_world_patches.db
export_ace_pcap_exports:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Install datasette
run: python3 -m pip install datasette
- name: Install db-to-sqlite from my fork
run: python3 -m pip install "db-to-sqlite @ git+https://github.com/amoeba/db-to-sqlite#egg=db-to-sqlite[mysql]"
- name: Start MySQL
run: sudo systemctl start mysql.service
- name: Download latest release
uses: robinraju/release-downloader@v1.7
with:
repository: ACEmulator/ACE-PCAP-Exports
latest: true
fileName: ACE.World*.zip
- name: Decompress
run: find . -iname "ACE-World*.zip" -exec unzip {} \;
- name: Load SQL
run: sh scripts/load.sh
- name: Export
run: db-to-sqlite --all mysql://root:root@localhost/ace_world ace_pcap_exports.db
- uses: actions/upload-artifact@v3
with:
name: ace_pcap_exports
path: ./ace_pcap_exports.db
export_ace_base:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Install datasette
run: python3 -m pip install datasette
- name: Install db-to-sqlite from my fork
run: python3 -m pip install "db-to-sqlite @ git+https://github.com/amoeba/db-to-sqlite#egg=db-to-sqlite[mysql]"
- name: Start MySQL
run: sudo systemctl start mysql.service
- name: Download release
uses: robinraju/release-downloader@v1.7
with:
repository: ACEmulator/ACE-World-16PY
latest: true
fileName: ACE.World*.zip
- name: Decompress
run: find . -iname "ACE-World*.zip" -exec unzip {} \;
- name: Load SQL
run: sh scripts/load.sh
- name: Export
run: db-to-sqlite --all mysql://root:root@localhost/ace_world ace_world_base.db
- uses: actions/upload-artifact@v3
with:
name: ace_world_base
path: ./ace_world_base.db
export_magnus_ace_shard_retail:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Install datasette
run: python3 -m pip install datasette
- name: Install db-to-sqlite from my fork
run: python3 -m pip install "db-to-sqlite @ git+https://github.com/amoeba/db-to-sqlite#egg=db-to-sqlite[mysql]"
- name: Start MySQL
run: sudo systemctl start mysql.service
- name: Clone repository
uses: actions/checkout@v4
with:
repository: Mag-nus/ACE-Shard-Retail
path: ACE-Shard-Retail
- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
- name: Load SQL
run: sh scripts/load.sh
- name: Export
run: db-to-sqlite --all mysql://root:root@localhost/ace_shard magnus_ace_shared_retail.db
- uses: actions/upload-artifact@v3
with:
name: ace_world_patches
path: ./magnus_ace_shared_retail.db
dogsheep:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v3
- run: python -m pip install github-to-sqlite
- name: Create auth.json
run: |
echo "{\"github_personal_token\": \"${{ secrets.GITHUB_TOKEN }}\"}" > auth.json
- run: github-to-sqlite issues github.db acemulator/ace
- run: github-to-sqlite pull-requests github.db acemulator/ace
- run: github-to-sqlite issue-comments github.db acemulator/ace
- run: github-to-sqlite commits github.db acemulator/ace
- run: github-to-sqlite contributors github.db acemulator/ace
- uses: actions/upload-artifact@v3
with:
name: github.db
path: ./github.db
publish_with_datasette:
runs-on: ubuntu-latest
needs:
[
export_ace_world_patches,
export_ace_pcap_exports,
export_ace_base,
export_magnus_ace_shard_retail,
dogsheep,
]
steps:
- name: Check out repository code
uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
name: "ace_world_patches"
- uses: actions/download-artifact@v3
with:
name: "ace_pcap_exports"
- uses: actions/download-artifact@v3
with:
name: "ace_world_base"
- uses: actions/download-artifact@v3
with:
name: "magnus_ace_shared_retail"
- uses: actions/download-artifact@v3
with:
name: "github.db"
- name: Install datasette
run: python3 -m pip install datasette
- uses: superfly/flyctl-actions/setup-flyctl@master
- run: datasette install datasette-publish-fly
- run: ls -al
- run: datasette publish fly --metadata metadata.json --app="acemu-db" *db
env:
FLY_APP: $${secrets.FLY_APP}
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}