diff --git a/.github/workflows/docker-publish-ods-dlh-project.yml b/.github/workflows/docker-publish-ods-dlh-project.yml index d8e7cec..eaa91ea 100644 --- a/.github/workflows/docker-publish-ods-dlh-project.yml +++ b/.github/workflows/docker-publish-ods-dlh-project.yml @@ -7,7 +7,7 @@ on: branches: [ "main" ] env: - # Abi: image name is bcgov/nr-dbt-project/ods-dlh:main + # Abi: image name is ghcr.io/bcgov/nr-dbt-project-ods-dlh:main REGISTRY: ghcr.io DBT_PATH: ods_dlh_data_processing IMAGE_NAME: ${{ github.repository }}-ods-dlh diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 8dc26d8..f7b1dae 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -31,7 +31,7 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0 - + - name: Log into registry ${{ env.REGISTRY }} if: github.event_name != 'pull_request' uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0 diff --git a/README.md b/README.md index c9674c6..53c04cc 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,19 @@ # nr-dbt-project This repository contains Data build tools(DBT) data models and other artifacts -# Docker Build Command -docker build -t image-registry.apps.emerald.devops.gov.bc.ca/a1b9b0-dev/: -f . +# Use of GHCR +Container images are built automatically and pushed to the GHCR any time there is a push or PR to the **main** branch. Images are named according to the file path and tagged with the branch name. Use the image name in an Airflow DAG to create a job using the DBT container. See Airflow example here: [dbt_example.py](https://github.com/bcgov/nr-airflow/blob/e45c83f933d1f96e479a36a3e765dabd61e1ff2e/dags/dbt_example.py#L19) + +Usage example: +```sh +docker pull ghcr.io/bcgov/nr-dbt-project-ods-dlh:main +``` -# Docker Push Command +Alternatively, there is this manual workflow: +```sh +docker build -t image-registry.apps.emerald.devops.gov.bc.ca/a1b9b0-dev/: -f . +``` +```sh docker push image-registry.apps.emerald.devops.gov.bc.ca/a1b9b0-dev/: +``` +