mirror of
https://github.com/FlipsideCrypto/fsc-evm.git
synced 2026-02-06 15:36:43 +00:00
add dds call
This commit is contained in:
parent
1ed3ffca53
commit
bae8564ca4
@ -2,6 +2,11 @@ name: dbt_run_template_docs_update
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
resource_id:
|
||||
description: 'DDS resource ID to refresh (defaults to repository name if not provided)'
|
||||
required: false
|
||||
type: string
|
||||
|
||||
jobs:
|
||||
run_dbt_jobs_refresh:
|
||||
@ -79,8 +84,36 @@ jobs:
|
||||
run: |
|
||||
git push -f --set-upstream origin docs
|
||||
|
||||
determine-resource-id:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
resource_id: ${{ steps.set-resource-id.outputs.resource_id }}
|
||||
steps:
|
||||
- name: Set resource ID
|
||||
id: set-resource-id
|
||||
run: |
|
||||
if [ -n "${{ inputs.resource_id }}" ]; then
|
||||
echo "resource_id=${{ inputs.resource_id }}" >> $GITHUB_OUTPUT
|
||||
else
|
||||
# Extract repo name from github.repository (format: owner/repo-name)
|
||||
REPO_NAME=$(echo "${{ github.repository }}" | cut -d'/' -f2)
|
||||
echo "resource_id=$REPO_NAME" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
echo "Using resource_id: $(cat $GITHUB_OUTPUT | grep resource_id | cut -d'=' -f2)"
|
||||
|
||||
refresh-dds-cache:
|
||||
needs: [run_dbt_jobs_refresh, determine-resource-id]
|
||||
if: success()
|
||||
uses: FlipsideCrypto/analytics-workflow-templates/.github/workflows/refresh_dds.yml@main
|
||||
with:
|
||||
resource_id: ${{ needs.determine-resource-id.outputs.resource_id }}
|
||||
api_url: ${{ github.ref == 'refs/heads/main' && 'https://dds-api.fsc-data-platform.io' || 'https://dds-api.fsc-data-platform-stg.io' }}
|
||||
force_refresh: true
|
||||
secrets:
|
||||
DDS_API_KEY: ${{ github.ref == 'refs/heads/main' && secrets.DDS_PROD_API_KEY || secrets.DDS_STG_API_KEY }}
|
||||
|
||||
notify-failure:
|
||||
needs: [run_dbt_jobs_refresh]
|
||||
needs: [run_dbt_jobs_refresh, refresh-dds-cache]
|
||||
if: failure()
|
||||
uses: ./.github/workflows/slack_notify.yml
|
||||
secrets:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user