-
Notifications
You must be signed in to change notification settings - Fork 26
25 lines (25 loc) · 1.04 KB
/
main.yaml
File metadata and controls
25 lines (25 loc) · 1.04 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
name: Update Image Reference
on:
repository_dispatch:
types: gitops-example-app-trigger
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check Out The Repository
uses: actions/checkout@v2
- name: Update Version In Checked-Out Code
if: ${{ github.event.client_payload.sha }}
run: |
sed -i "s@\(.*image:\).*@\1 docker.io/${{secrets.DOCKER_USER}}/gitops-example-app:${{ github.event.client_payload.sha }}@" ${GITHUB_WORKSPACE}/workloads/webserver.yaml
- name: Commit The New Image Reference
uses: stefanzweifel/git-auto-commit-action@v4
if: ${{ github.event.client_payload.sha }}
with:
commit_message: Deploy new image ${{ github.event.client_payload.sha }}
branch: main
commit_options: '--no-verify --signoff'
repository: .
commit_user_name: Example GitOps Bot
commit_user_email: gitops-example-bot@container-solutions.com
commit_author: Example GitOps Bot <gitops-example-bot@container-solutions.com>