From 5b4a978402cd560dbcd23c39fdc5655784baf21a Mon Sep 17 00:00:00 2001 From: Uche Madu Date: Sat, 30 Sep 2023 12:36:59 +0100 Subject: [PATCH] fix workflow git push --- .github/workflows/retag.yaml | 4 ++-- Dockerfile | 2 +- README.md | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/retag.yaml b/.github/workflows/retag.yaml index ee05731..81138d6 100644 --- a/.github/workflows/retag.yaml +++ b/.github/workflows/retag.yaml @@ -84,8 +84,8 @@ jobs: - name: Commit changes to values file run: | - git config --local user.email "dreemer6@yahoo.com" - git config --local user.name "Uche Madu" + git config --local user.email "${{ secrets.GIT_USER_EMAIL }}" + git config --local user.name "${{ secrets.GIT_USER_NAME }}" git add $VALUES_FILE git commit -m "Update image repository and tag in values file to $GAR_LOCATION-docker.pkg.dev/$PROJECT_ID/$REPOSITORY/$IMAGE:$GITHUB_SHA" git push diff --git a/Dockerfile b/Dockerfile index 5eeb9f5..085ac39 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,7 @@ ARG AIRFLOW_VERSION=2.7.1 # Using the official Apache Airflow image -FROM apache/airflow:${AIRFLOW_VERSION} +FROM apache/airflow:${AIRFLOW_VERSION} WORKDIR /usr/local/airflow diff --git a/README.md b/README.md index 87c5a0e..5cf04bf 100644 --- a/README.md +++ b/README.md @@ -5,4 +5,5 @@ ***This is one of two repositories with code for the entire DEB Project. While this repository focuses on the application code such as Airflow DAGs, the [DEB Infrastructure repository](https://github.com/uche-madu/deb-infrastructure) focuses on provisioning cloud resources. This separation of concerns via separate repositories aims to follow GitOps Principles.*** ## CI/CD Workflow -The `build-push.yaml` Github Actions workflow builds a custom airflow image and pushes it to Google Artifact Registry. It then checks out the [DEB Infrastructure repository](https://github.com/uche-madu/deb-infrastructure) to update the `airflow-helm/values-dev.yaml` file with the new image and tag. For this to work, create a repository-scoped `Personal Access Token` for your Github account and store it as a secret in this repository. Visit [Github Docs](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-personal-access-token-classic) for details about creating tokens. \ No newline at end of file +- The `build-push.yaml` Github Actions workflow builds a custom airflow image and pushes it to Google Artifact Registry. It then checks out the [DEB Infrastructure repository](https://github.com/uche-madu/deb-infrastructure) to update the `airflow-helm/values-dev.yaml` file with the new image and tag. For this to work, create a repository-scoped `Personal Access Token` for your Github account and store it as a secret in this repository. Visit [Github Docs](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-personal-access-token-classic) for details about creating tokens. +- Also create Github secrets for your Github email and Username \ No newline at end of file