Skip to content

Commit

Permalink
Merge pull request #9 from EJOOSTEROP/release
Browse files Browse the repository at this point in the history
Release
  • Loading branch information
EJOOSTEROP authored Mar 30, 2023
2 parents 581eca8 + 27d53cb commit 1f24a89
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 5 deletions.
19 changes: 15 additions & 4 deletions .github/workflows/build-container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,16 @@
name: Create and publish a Docker image

on:
workflow_dispatch:
push:
branches: ['release']
branches:
- 'release'
- 'master'
tags:
- 'v*'
pull_request:
branches:
- 'master'

env:
REGISTRY: ghcr.io
Expand All @@ -29,20 +37,23 @@ jobs:
uses: actions/checkout@v3

- name: Log in to the Container registry
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
#uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
#uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- name: Build and push Docker image
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
#uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
uses: docker/build-push-action@v4
with:
context: .
push: true
Expand Down
7 changes: 6 additions & 1 deletion dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,21 @@ COPY ./dags/. /${MELTANO_PROJ_ROOT}/${PROJECT}/orchestrate/dags/
# https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#add-or-copy
ARG DUCKDB_CLI_FOLDER=duckdb_cli
COPY ./DuckDB_CLI/duckdb_cli-linux-amd64 /${MELTANO_PROJ_ROOT}/${DUCKDB_CLI_FOLDER}
RUN chmod -R u+x /${MELTANO_PROJ_ROOT}/${DUCKDB_CLI_FOLDER}/

# TODO: put into a Docker volume? Just database or complete ${MELTANO_PROJ_ROOT} folder?
# https://docs.docker.com/engine/reference/builder/#volume
RUN mkdir -p /${MELTANO_PROJ_ROOT}/data/dev/ \
&& mkdir -p /${MELTANO_PROJ_ROOT}/data/test/ \
&& mkdir -p /${MELTANO_PROJ_ROOT}/data/prod/ \
&& /${MELTANO_PROJ_ROOT}/${DUCKDB_CLI_FOLDER}/duckdb /${MELTANO_PROJ_ROOT}/data/dev/data.duckdb "select * from pg_tables;" \
&& /${MELTANO_PROJ_ROOT}/${DUCKDB_CLI_FOLDER}/duckdb /${MELTANO_PROJ_ROOT}/data/dev/data.duckdb "select * from pg_tables;" \
&& /${MELTANO_PROJ_ROOT}/${DUCKDB_CLI_FOLDER}/duckdb /${MELTANO_PROJ_ROOT}/data/test/data.duckdb "select * from pg_tables;" \
&& /${MELTANO_PROJ_ROOT}/${DUCKDB_CLI_FOLDER}/duckdb /${MELTANO_PROJ_ROOT}/data/prod/data.duckdb "select * from pg_tables;"


###RUN chmod -R u+x /project/data/
###RUN /project/duckdb_cli/duckdb /project/data/dev/data.duckdb "select * from pg_tables;"

RUN meltano invoke airflow dags pause stage_gie_dag \
&& meltano invoke airflow dags pause stage_gie_backfill_dag

Expand Down

0 comments on commit 1f24a89

Please sign in to comment.