-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Using github vars for workflow directory
- Loading branch information
GitHub Actions
committed
Mar 18, 2024
1 parent
e6883c3
commit 1f2f6d2
Showing
2 changed files
with
10 additions
and
10 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,24 +27,24 @@ jobs: | |
- name: Clone another repository | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: ${{ secrets.PROD_DEPLOY_REPO }} | ||
repository: ${{ vars.PROD_DEPLOY_REPO }} | ||
ref: master | ||
path: ${{ secrets.PROD_DEPLOY_REPO }} | ||
path: ${{ vars.PROD_DEPLOY_REPO }} | ||
persist-credentials: false | ||
token: ${{ secrets.DEPLOY_GIT_ACCESS_TOKEN }} | ||
|
||
- name: Update Image Tag | ||
run: | | ||
NEW_TAG="v$(git rev-parse --short HEAD)" | ||
cd ${{ secrets.PROD_DEPLOY_REPO }}/${{ secrets.EKS_CLUSTER_NAME }}/integrations | ||
cd ${{ vars.PROD_DEPLOY_REPO }}/${{ secrets.EKS_CLUSTER_NAME }}/integrations | ||
kustomize edit set image docker.io/${{ secrets.DOCKERHUB_USERNAME }}/fyle_slack-app=docker.io/${{ secrets.DOCKERHUB_USERNAME }}/fyle_slack-app:$NEW_TAG | ||
- name: Commit and push changes | ||
run: | | ||
cd ${{ secrets.PROD_DEPLOY_REPO }}/ | ||
cd ${{ vars.PROD_DEPLOY_REPO }}/ | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "GitHub Actions" | ||
git add . | ||
git commit -m "Update slack-app image tag" | ||
git remote set-url origin https://x-access-token:${{ secrets.DEPLOY_GIT_ACCESS_TOKEN }}@github.com/${{ secrets.PROD_DEPLOY_REPO }} | ||
git remote set-url origin https://x-access-token:${{ secrets.DEPLOY_GIT_ACCESS_TOKEN }}@github.com/${{ vars.PROD_DEPLOY_REPO }} | ||
git push origin master |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,24 +31,24 @@ jobs: | |
- name: Clone another repository | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: ${{ secrets.STAGING_DEPLOY_REPO }} | ||
repository: ${{ vars.STAGING_DEPLOY_REPO }} | ||
ref: master | ||
path: ${{ secrets.STAGING_DEPLOY_REPO }} | ||
path: ${{ vars.STAGING_DEPLOY_REPO }} | ||
persist-credentials: false | ||
token: ${{ secrets.DEPLOY_GIT_ACCESS_TOKEN }} | ||
|
||
- name: Update Image Tag | ||
run: | | ||
NEW_TAG="v$(git rev-parse --short HEAD)" | ||
cd ${{ secrets.STAGING_DEPLOY_REPO }}/${{ secrets.EKS_CLUSTER_NAME }}/integrations | ||
cd ${{ vars.STAGING_DEPLOY_REPO }}/${{ vars.STAGING_DEPLOY_DIR }}/integrations | ||
kustomize edit set image docker.io/${{ secrets.DOCKERHUB_USERNAME }}/fyle_slack-app=docker.io/${{ secrets.DOCKERHUB_USERNAME }}/fyle_slack-app:$NEW_TAG | ||
- name: Commit and push changes | ||
run: | | ||
cd ${{ secrets.STAGING_DEPLOY_REPO }}/ | ||
cd ${{ vars.STAGING_DEPLOY_REPO }}/ | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "GitHub Actions" | ||
git add . | ||
git commit -m "Update image tag" | ||
git remote set-url origin https://x-access-token:${{ secrets.DEPLOY_GIT_ACCESS_TOKEN }}@github.com/${{ secrets.STAGING_DEPLOY_REPO }} | ||
git remote set-url origin https://x-access-token:${{ secrets.DEPLOY_GIT_ACCESS_TOKEN }}@github.com/${{ vars.STAGING_DEPLOY_REPO }} | ||
git push origin master |