Skip to content

Commit

Permalink
fix workflow git push
Browse files Browse the repository at this point in the history
  • Loading branch information
uche-madu committed Sep 30, 2023
1 parent 8358480 commit 5b4a978
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/retag.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ jobs:
- name: Commit changes to values file
run: |
git config --local user.email "[email protected]"
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
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
- 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

0 comments on commit 5b4a978

Please sign in to comment.