From e6e47cf87f22729a34e83d563dfe27ea324c3796 Mon Sep 17 00:00:00 2001 From: barrfalk Date: Tue, 19 Dec 2023 15:02:52 -0800 Subject: [PATCH] Update .push-helm-chart.yml --- .github/workflows/.push-helm-chart.yml | 48 ++++++++++++++++++++++++-- 1 file changed, 45 insertions(+), 3 deletions(-) diff --git a/.github/workflows/.push-helm-chart.yml b/.github/workflows/.push-helm-chart.yml index a27a1e84..8cf0e5d7 100644 --- a/.github/workflows/.push-helm-chart.yml +++ b/.github/workflows/.push-helm-chart.yml @@ -92,10 +92,52 @@ jobs: # If here skip deployment echo "No triggers have fired, deployment skipped" - - name: Setup Git + - name: Setup SSH for Target Repository + run: | + mkdir -p ~/.ssh + echo "${{ secrets.MANIFEST_REPO_DEPLOY_KEY }}" > ~/.ssh/id_rsa + echo "${{ secrets.MANIFEST_REPO_DEPLOY_KEY_PUB }}" > ~/.ssh/id_rsa.pub + chmod 600 ~/.ssh/id_rsa + chmod 600 ~/.ssh/id_rsa.pub + ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts + + - name: Clone Target Repository + run: | + git clone git@github.com:${{ vars.GITOPS_REPO}}.git target-repo + cd target-repo + git checkout -b update-helm-chart + + - name: Copy Helm Chart + run: | + cp -r ./charts/* ./helm-chart/ + cd target-repo + + - name: Commit and Push Changes + run: | + git add . + git commit -m "Update Helm chart" + git push --set-upstream origin update-helm-chart + + - name: Create Pull Request + uses: repo-sync/pull-request@v2 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + pr_title: "Update Helm Chart" + pr_body: "Automated update of Helm chart" + destination_branch: "main" + source_branch: "update-helm-chart" + + + + + + + + + - name: Setup Git run: | - git config --global user.name 'Your Name' - git config --global user.email 'your-email@example.com' + git config --global user.name 'Barrett Falk' + git config --global user.email 'bfalk_t@salussystems.com' - name: Clone Target Repository env: