-
Notifications
You must be signed in to change notification settings - Fork 0
32 lines (30 loc) · 1.15 KB
/
main.yml
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
name: Update Image Reference
on:
repository_dispatch:
types: kneipolympics-deploy-trigger
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check Out The Repository
uses: actions/checkout@v2
- name: Set lower case owner name
run: |
echo "OWNER_LC=${OWNER,,}" >>${GITHUB_ENV}
env:
OWNER: "${{ github.repository_owner }}"
- name: Update Version In Checked-Out Code
if: ${{ github.event.client_payload.sha }}
run: |
sed -i "s@\(.*image:\).*@\1 ghcr.io/${{ env.OWNER_LC }}/kneipolympics:${{ github.event.client_payload.sha }}@" ${GITHUB_WORKSPACE}/manifests/deployment.yml
- 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: PescaDev GitOps Bot
commit_user_email: [email protected]
commit_author: PescaDev GitOps <[email protected]>