Skip to content

Commit

Permalink
take 10
Browse files Browse the repository at this point in the history
  • Loading branch information
cwaldren-ld committed Mar 29, 2024
1 parent 6afc071 commit e8adaf7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
run: |
./scripts/ci/check-json-schemas.sh
- name: Set up Go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: 1.22
- name: Build
Expand Down
14 changes: 10 additions & 4 deletions .github/workflows/crawl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,18 @@ jobs:
- name: Diff against previous crawl
id: diff
run: |
sqldiff --primarykey ${{ env.DB_NAME }} ${{ env.DB_NAME }}.new
echo "changed=$?" >> $GITHUB_OUTPUT
# If the database changed, generate the data products (json files).
changes=$(sqldiff --primarykey ${{ env.DB_NAME }} ${{ env.DB_NAME }}.new)
if [ -z "$changes" ]; then
echo "No changes detected."
echo "changed=false" >> $GITHUB_OUTPUT
else
echo "Changes detected!"
echo "changed=true" >> $GITHUB_OUTPUT
fi
- name: Update data
id: update
if: steps.diff.outputs.changed == '1'
if: steps.diff.outputs.changed == 'true'
run: |
mv ${{ env.DB_NAME }}.new ${{ env.DB_NAME }}
rm -rf ${{ env.METADATA_DIR }}
Expand Down

0 comments on commit e8adaf7

Please sign in to comment.