Skip to content

Commit

Permalink
feat: create github dbt action initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaagrav committed Nov 23, 2022
0 parents commit b110c79
Show file tree
Hide file tree
Showing 32 changed files with 19,865 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
GITHUB_TOKEN={{Your Github Personal Access Token for local use only}}
ATLAN_INSTANCE_URL={{Atlan instance URL, to be set as a repository secret.}}
ATLAN_API_TOKEN={{Atlan Bearer token, to be set as a repository secret.}}
IS_DEV={{True when running locally}}
29 changes: 29 additions & 0 deletions .github/workflows/package-action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Package Action

on:
push:
branches:
- main

jobs:
package-action:
name: Build Project
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 16

- name: Package Action
run: |
npm i
npm run build
git config --global user.email "[email protected]"
git config --global user.name "Atlan"
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}
git add .
git commit -am "chore: package action"
git push -u origin main
26 changes: 26 additions & 0 deletions .github/workflows/test-action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Test Action

on:
pull_request:
types: [opened, edited, reopened]

jobs:
get-downstream-assets:
name: Get Downstream Assets
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1

- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: |
echo "$GITHUB_CONTEXT"
- name: Run Action
uses: ./
with:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
ATLAN_INSTANCE_URL: ${{secrets.ATLAN_INSTANCE_URL}}
ATLAN_API_TOKEN: ${{secrets.ATLAN_API_TOKEN}}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.env
node_modules/
22 changes: 22 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: "Atlan dbt Action"
description: "Get all the downstream assets that get affected when dbt model sql files are changed on pull request conversations."
author: "Atlan"

inputs:
GITHUB_TOKEN:
description: "GitHub token"
required: true
ATLAN_API_TOKEN:
description: "Atlan API token"
required: true
ATLAN_INSTANCE_URL:
description: "Atlan instance URL"
required: true

runs:
using: "node16"
main: "dist/index.js"

branding:
icon: activity
color: blue
Loading

0 comments on commit b110c79

Please sign in to comment.