-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
35 additions
and
1 deletion.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Sync to Dune | ||
on: | ||
push: | ||
branches: [main] | ||
|
||
jobs: | ||
update-queries: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 # Necessary to get a complete history for diff | ||
|
||
- name: Get list of changed files in a specific directory | ||
id: get-changed-files | ||
run: | | ||
CHANGED_FILES=$(git diff \ | ||
--name-only ${{ github.event.before }} ${{ github.sha }} \ | ||
-- queries | paste -sd "," -) | ||
echo "CHANGED_FILES=$CHANGED_FILES" >> $GITHUB_ENV | ||
echo "changed_files=$CHANGED_FILES" >> $GITHUB_OUTPUT | ||
- name: Update Queries | ||
uses: bh2smith/[email protected] | ||
with: | ||
changedQueries: ${{ steps.get-changed-files.outputs.changed_files }} | ||
duneApiKey: ${{ secrets.DUNE_API_KEY }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
# dune-queries | ||
# Dune Queries | ||
|
||
Repository containing protocol relevant dune queries | ||
|
||
All query file names must be formatted as `*_{queryId}.sql`. This will continuous integration to automatically sync queries whenever a PR is merged into main. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
SELECT * | ||
FROM ethereum.transactions | ||
LIMIT 2 |