-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathdev-deploy-gitops-backends.yaml
More file actions
39 lines (34 loc) · 1.17 KB
/
dev-deploy-gitops-backends.yaml
File metadata and controls
39 lines (34 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: dev-deploy-gitops-backends
on:
push:
branches:
- main
concurrency:
group: dev-deploy-gitops-backends-${{ github.ref }}
cancel-in-progress: true
jobs:
dev-deploy-gitops-backends:
runs-on: ubuntu-latest
steps:
- name: Checkout GitOps Repository
uses: actions/checkout@v4
with:
repository: dembrane/echo-gitops
token: ${{ secrets.GITOPS_REPO_TOKEN }}
ref: main
- name: Update global.imageTag in values.yaml
id: update_values
run: |
NEW_TAG="${GITHUB_SHA}"
echo "Updating global.imageTag to ${NEW_TAG}"
# Use a regex to update the line that starts with "imageTag:" regardless of its current value.
sed -E -i "s/^( *imageTag: *).*/\1\"${NEW_TAG}\"/" helm/echo/values.yaml
echo "Updated values.yaml content:"
cat helm/echo/values.yaml
- name: Commit and push changes
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions@github.com"
git add helm/echo/values.yaml
git commit -m "Update dev image tag to ${GITHUB_SHA}"
git push origin main