Upload latest data to github release #757
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: Upload latest data to github release | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 9 * * *' | |
jobs: | |
build: | |
runs-on: self-hosted | |
steps: | |
- name: Get current date | |
id: t1 | |
uses: Kaven-Universe/github-action-current-date-time@v1 | |
with: | |
format: "YYYY-MM-DD" | |
- name: Save current date | |
id: date | |
run: echo "date=${{ steps.t1.outputs.time }}" >> $GITHUB_OUTPUT | |
- uses: addnab/docker-run-action@v3 | |
with: | |
registry: docker.io | |
image: chenditc/investment_data:latest | |
options: -v /mnt/c/github_runner/investment_data/investment_data/:/output -v dolt:/dolt | |
run: | | |
bash -c "bash dump_qlib_bin.sh && ls -lh /output/" | |
- name: Upload binaries to release | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GH_TOKEN }} | |
file: ${{ github.workspace }}/qlib_bin.tar.gz | |
asset_name: qlib_bin.tar.gz | |
tag: ${{ steps.date.outputs.date }} | |
overwrite: true | |
body: "Daily update release" |