Get ENS #102
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: Get ENS | |
on: | |
push: | |
branches: | |
- master | |
schedule: | |
- cron: "0 3 * * 1" | |
workflow_dispatch: | |
jobs: | |
get_ens_to_sqlite: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@main | |
- name: Set up Python 3.7 | |
uses: actions/setup-python@main | |
with: | |
python-version: "3.7" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install --upgrade pytz | |
pip install --upgrade google-cloud-bigquery | |
pip install ethereum-utils==0.5.0 | |
- name: Set up Cloud SDK | |
uses: google-github-actions/setup-gcloud@v1 | |
with: | |
service_account_key: ${{ secrets.GETENSKEY }} | |
export_default_credentials: true | |
- name: 'Authenticate to Google Cloud' | |
uses: 'google-github-actions/auth@v1' | |
with: | |
credentials_json: '${{ secrets.GOOGLE_CREDENTIALS }}' | |
- name: Get ENS | |
run: | | |
python ./get_ENS.py | |
- name: upload ens.zip | |
uses: actions/upload-artifact@main | |
with: | |
name: ENS | |
path: outputs/ | |
- name: zip ENS file | |
run: | | |
cd outputs | |
zip -r ENS.zip ENS | |
- name: Get current time | |
uses: josStorer/get-current-time@v2 | |
id: current-time | |
with: | |
format: YYYY-MM-DD | |
- name: Create Release | |
id: create_release | |
uses: marvinpinto/action-automatic-releases@latest | |
with: | |
repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
automatic_release_tag: "latest" | |
title: ens-release-${{ steps.current-time.outputs.formattedTime }} | |
draft: false | |
prerelease: false | |
- name: Upload Release Asset | |
id: upload-release-asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps | |
asset_path: ./outputs/ENS.zip | |
asset_name: ENS.zip | |
asset_content_type: application/zip |