-
Notifications
You must be signed in to change notification settings - Fork 1
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
2 changed files
with
58 additions
and
0 deletions.
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,47 @@ | ||
name: Dev build image & push | ||
|
||
on: | ||
push: | ||
branches: [ test ] | ||
|
||
env: | ||
working-directory: silverwork_dbt | ||
|
||
jobs: | ||
build: | ||
name: install and build dbt | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
# actions/checkout MUST come before auth | ||
- name: Checkout Repo | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup auth | ||
id: "auth" | ||
uses: "google-github-actions/auth@v1" | ||
with: | ||
project_id: ${{ vars.DBT_BIGQUERY_PROJECT_ID }} | ||
credentials_json: ${{secrets.KEYFILE_CONTENTS}} | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
|
||
- name: Build & Push Image | ||
uses: docker/build-push-action@v2 | ||
with: | ||
context: ${{ github.workspace }} | ||
push: true | ||
tags: ${{ secrets.DBT_REGISTRY_ENDPOINT }}:${{ secrets.DBT_REGISTRY_VERSION }} | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max | ||
|
||
# - name: Trigger Airflow init dag | ||
# env: | ||
# AIRFLOW_WEBSERVER_ENDPOINT: ${{ secrets.AIRFLOW_WEBSERVER_ENDPOINT }} | ||
# AIRFLOW_WEBSERVER_ID: ${{ secrets.AIRFLOW_WEBSERVER_ID }} | ||
# AIRFLOW_WEBSERVER_PASSWORD: ${{ secrets.AIRFLOW_WEBSERVER_PASSWORD }} | ||
# AIRFLOW_DBT_INIT_DAG_ID: ${{ secrets.AIRFLOW_DBT_INIT_DAG_ID }} | ||
# shell: bash | ||
# run: | | ||
# curl "$AIRFLOW_WEBSERVER_ENDPOINT/api/v1/dags/$AIRFLOW_DBT_INIT_DAG_ID/dagRuns" --user "$AIRFLOW_WEBSERVER_ID:$AIRFLOW_WEBSERVER_PASSWORD" -H 'Content-Type: application/json' -d '{}' |
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,11 @@ | ||
# 베이스 이미지 선택 | ||
FROM python:3.9-slim-buster | ||
|
||
# 작업 디렉토리 설정 | ||
WORKDIR /app | ||
|
||
# 필요한 파일 복사 | ||
COPY silverwork_dbt/ /app/silverwork_dbt/ | ||
|
||
# 의존성 설치 | ||
RUN pip install dbt-snowflake pandas |