update-example-datasets #325
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-example-datasets | |
on: | |
schedule: | |
- cron: "45 0 * * *" | |
workflow_dispatch: {} | |
concurrency: update-example-datasets | |
env: | |
# AWS credentials | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
AWS_DEFAULT_REGION: us-west-2 | |
# Dataset pull credentials | |
ETHERSCAN_API_KEY: ${{ secrets.ETHERSCAN_API_KEY }} | |
jobs: | |
update: | |
name: Update example datasets | |
runs-on: ubuntu-latest | |
steps: | |
########################################### | |
# Install dependencies | |
########################################### | |
- name: Install kamu | |
shell: bash | |
run: | | |
curl -s "https://get.kamu.dev" | sh | |
- name: Print info | |
shell: bash | |
run: | | |
echo "Work dir: $PWD" | |
echo "Podman version:" | |
podman version | |
echo "AWS CLI version:" | |
aws --version | |
echo "Kamu version:" | |
kamu --version | |
########################################### | |
# Checkout repo | |
########################################### | |
- name: Checkout kamu-contrib | |
uses: actions/checkout@v3 | |
with: | |
path: kamu-contrib | |
########################################### | |
# Update | |
########################################### | |
- name: Init workspace from S3 | |
shell: bash | |
run: | | |
mkdir workspace && cd workspace | |
../kamu-contrib/.ci/init-from-s3.py | |
- name: Update datasets | |
shell: bash | |
run: | | |
cd workspace | |
../kamu-contrib/.ci/update.py | |
- name: Push to S3 | |
shell: bash | |
run: | | |
cd workspace | |
../kamu-contrib/.ci/push-to-s3.py |