Skip to content

Commit

Permalink
Deploy on push - Get HEAD commit updated
Browse files Browse the repository at this point in the history
  • Loading branch information
gerardnico committed Aug 24, 2024
1 parent 96aaa12 commit a1d90f8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ jobs:
uses: actions/checkout@v3

- name: Get the last commit hash on main
run: echo "LAST_COMMIT=$(git rev-parse origin/main)" >> $GITHUB_ENV
run: |
set -Eeuo pipefail
echo "LAST_COMMIT=$(git rev-parse HEAD)" >> $GITHUB_ENV
- name: Check out the deploy repository
uses: actions/checkout@v3
Expand All @@ -32,6 +34,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.ARGOCD_GITHUB_TOKEN }}
run: |
set -Eeuo pipefail
cd kube-argocd || echo 'Fail Cd' & exit 1
echo "Patch Deployment with the last commit ($LAST_COMMIT)"
# Patch with the last commit the app deployment
Expand Down

0 comments on commit a1d90f8

Please sign in to comment.