Skip to content

Commit

Permalink
adding my ci steps
Browse files Browse the repository at this point in the history
  • Loading branch information
anmolsaini-hpe committed Aug 8, 2024
1 parent f1364c9 commit a0de880
Showing 1 changed file with 23 additions and 2 deletions.
25 changes: 23 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ jobs:

push:
runs-on: ubuntu-latest

needs: build

steps:
Expand All @@ -63,4 +62,26 @@ jobs:
context: .
file: ./Dockerfile
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/go-web-app:${{github.run_id}}
tags: ${{ secrets.DOCKERHUB_USERNAME }}/go-web-app:${{github.run_id}}

update-newtag-in-helm-chart:
runs-on: ubuntu-latest
needs: push

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
token: ${{ secrets.TOKEN }}

- name: Update tag in Helm chart
run: |
sed -i 's/tag: .*/tag: "${{github.run_id}}"/' helm/go-web-app-chart/values.yaml
- name: Commit and push changes
run: |
git config --global user.email "anmol.saini@hpe.com"
git config --global user.name "Anmol Saini"
git add helm/go-web-app-chart/values.yaml
git commit -m "Update tag in Helm chart"
git push

0 comments on commit a0de880

Please sign in to comment.