add helm pull #2
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
name: cicd | |
on: | |
- push | |
env: | |
GITOPS_REPO_URL: https://github.com/borikoss/charts-repo-actions-demo-gitops | |
GITOPS_REPO_BRANCH: main | |
jobs: | |
Build_Generate: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Source | |
uses: actions/checkout@v4 | |
- name: Generate Manifests | |
run: | | |
.github/workflows/utils/generate-manifests.py \ | |
${{ github.workspace }}/deployment/deploymentTargets \ | |
${{ github.workspace }}/generated_manifests | |
- name: See generated manifests list | |
run: | | |
find generated_manifests/ -print | |
- name: Upload Artifact generated_manifests | |
uses: actions/upload-artifact@v3 | |
with: | |
name: generated_manifests | |
path: generated_manifests/ | |
Deploy_To_Dev: | |
runs-on: ubuntu-latest | |
needs: Build_Generate | |
env: | |
GITOPS_REPO_FOLDER: dev | |
steps: | |
- name: Checkout Source | |
uses: actions/checkout@v4 | |
- name: Download Artifact generated_manifests | |
uses: actions/download-artifact@v3 | |
with: | |
name: generated_manifests | |
path: generated_manifests/ | |
- name: Create PR to GitOps repo | |
run: | | |
.github/workflows/utils/create-pr.sh \ | |
-s ${{ github.workspace }}/generated_manifests/${{ env.GITOPS_REPO_FOLDER }} \ | |
-d ${{ env.GITOPS_REPO_FOLDER }} \ | |
-r ${{ env.GITOPS_REPO_URL }} \ | |
-b ${{ env.GITOPS_REPO_BRANCH }} \ | |
-i ${{ github.run_number }} \ | |
-t ${{ secrets.GITOPS_REPO_COMMIT_TOKEN }} -m Y | |
Deploy_To_Qa: | |
runs-on: ubuntu-latest | |
needs: [Build_Generate,Deploy_To_Dev] | |
env: | |
GITOPS_REPO_FOLDER: qa | |
steps: | |
- name: Checkout Source | |
uses: actions/checkout@v4 | |
- name: Download Artifact generated_manifests | |
uses: actions/download-artifact@v3 | |
with: | |
name: generated_manifests | |
path: generated_manifests/ | |
- name: Create PR to GitOps repo | |
run: | | |
.github/workflows/utils/create-pr.sh \ | |
-s ${{ github.workspace }}/generated_manifests/${{ env.GITOPS_REPO_FOLDER }} \ | |
-d ${{ env.GITOPS_REPO_FOLDER }} \ | |
-r ${{ env.GITOPS_REPO_URL }} \ | |
-b ${{ env.GITOPS_REPO_BRANCH }} \ | |
-i ${{ github.run_number }} \ | |
-t ${{ secrets.GITOPS_REPO_COMMIT_TOKEN }} -m N | |
Deploy_To_Prod: | |
runs-on: ubuntu-latest | |
needs: [Build_Generate,Deploy_To_Qa] | |
env: | |
GITOPS_REPO_FOLDER: prod | |
steps: | |
- name: Checkout Source | |
uses: actions/checkout@v4 | |
- name: Download Artifact generated_manifests | |
uses: actions/download-artifact@v3 | |
with: | |
name: generated_manifests | |
path: generated_manifests/ | |
- name: Create PR to GitOps repo | |
run: | | |
.github/workflows/utils/create-pr.sh \ | |
-s ${{ github.workspace }}/generated_manifests/${{ env.GITOPS_REPO_FOLDER }} \ | |
-d ${{ env.GITOPS_REPO_FOLDER }} \ | |
-r ${{ env.GITOPS_REPO_URL }} \ | |
-b ${{ env.GITOPS_REPO_BRANCH }} \ | |
-i ${{ github.run_number }} \ | |
-t ${{ secrets.GITOPS_REPO_COMMIT_TOKEN }} -m N |