2024.7 #119
Workflow file for this run
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
# This workflow will install Python dependencies, | |
# run the python script to generate the database, | |
# and upload the regenerated database to the binary repo | |
name: Generate Database | |
on: | |
# More details on trigger events: | |
# https://docs.github.com/en/actions/reference/events-that-trigger-workflows | |
workflow_dispatch: # manual execution | |
release: | |
types: [published] | |
jobs: | |
build: | |
# Only run for the SIMPLE-AstroDB/SIMPLE-db repo, not on any forks | |
if: github.repository == 'SIMPLE-AstroDB/SIMPLE-db' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install astrodbkit2 | |
pip install git+https://github.com/astrodbtoolkit/astrodb_utils.git@main | |
- name: Generate sqlite (file) database | |
run: | | |
python simple/utils/generate_database.py | |
working-directory: . | |
- name: Push database file | |
uses: dmnemec/copy_file_to_another_repo_action@main | |
# Details for this action at https://github.com/marketplace/actions/push-a-file-to-another-repository | |
env: | |
API_TOKEN_GITHUB: ${{ secrets.SIMPLE_TOKEN }} | |
with: | |
source_file: 'SIMPLE.sqlite' | |
destination_repo: 'SIMPLE-AstroDB/SIMPLE-binary' | |
destination_branch: 'main' | |
user_email: '[email protected]' | |
user_name: 'github-actions' |