From 771e7327e4a9111b39633dde7ebc1304504295d3 Mon Sep 17 00:00:00 2001 From: Andrew <47720952+andrewhong5297@users.noreply.github.com> Date: Tue, 28 Nov 2023 17:00:57 -0500 Subject: [PATCH] whoops --- .../{update_from_dune.yml => update_to_dune.yml} | 13 ++++++++----- README.md | 10 +++++----- 2 files changed, 13 insertions(+), 10 deletions(-) rename .github/workflows/{update_from_dune.yml => update_to_dune.yml} (67%) diff --git a/.github/workflows/update_from_dune.yml b/.github/workflows/update_to_dune.yml similarity index 67% rename from .github/workflows/update_from_dune.yml rename to .github/workflows/update_to_dune.yml index 11baa52..cb73dd3 100644 --- a/.github/workflows/update_from_dune.yml +++ b/.github/workflows/update_to_dune.yml @@ -1,7 +1,9 @@ -name: Update From Dune Manually (Pull Queries) +name: Update to Dune on Commit (Push Queries) on: - workflow_dispatch: + push: + branches: + - main jobs: build: @@ -25,6 +27,7 @@ jobs: - name: Update all queries from Dune env: DUNE_API_KEY: ${{ secrets.DUNE_API_KEY }} - run: python -u scripts/update_to_dune.py - - \ No newline at end of file + run: python -u github_workflows/update_to_dune.py + + - name: Print name + run: echo "Hello ${{ secrets.ENV_TEST }}" \ No newline at end of file diff --git a/README.md b/README.md index ee12db7..ee52ee8 100644 --- a/README.md +++ b/README.md @@ -4,21 +4,21 @@ A template for creating repos to manage your Dune queries using the CRUD API. ### Setup -1. First, go to the dashboard you want to create a repo for (must be owned by you/your team). Click on the "github" icon in the top right to get a popup which will display all your query ids for said dashboard. - - Alternatively, just get the list queries you want to track if you aren't doing this for a dashboard. +1. First, go to the dashboard you want to create a repo for (must be owned by you/your team). Click on the "github" icon in the top right to see your query ids. + - Or if you aren't doing this for a dashboard, just get the list queries you want to manage. 2. Copy and paste that list into the `queries.yml` file. -3. Install the python requirements and run the `update_from_dune.py` script. +3. Install the python requirements and run the `update_from_dune.py` script. You can input the following lines into a terminal/CLI: ``` pip install -r requirements.txt python scripts/update_from_dune.py ``` -This will bring in your query ids into `query_{id}.sql` files within the `queries` folder. You can run that same python script again anytime you need to update your work from Dune into this repo. +This will bring in your query ids into `query_{id}.sql` files within the `queries` folder. You can run that same python script again anytime you need to update your work from Dune into this repo. -4. Make any changes you need to directly in the repo, and any time you push a commit, `update_to_dune.py` will run and save your changes into Dune directly. +4. Make any changes you need to directly in the repo, and any time you push a commit, `update_to_dune.py` will run and save your changes into Dune directly. We use the [Dune CRUD API](https://dune.com/docs/api/api-reference/edit-queries/) to manage queries - note that this does not change how your queries behave in app. ### For Contributors