lome-dev-deploy-trigger #9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Update Image Reference | |
on: | |
repository_dispatch: | |
types: lome-dev-deploy-trigger | |
jobs: | |
update-image: | |
permissions: | |
contents: write | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check Out The Repository | |
uses: actions/checkout@v4 | |
- 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 }}/lome-dev:${{ github.event.client_payload.sha }}@" ${GITHUB_WORKSPACE}/manifests/deployment.yml | |
- name: Commit The New Image Reference | |
uses: stefanzweifel/git-auto-commit-action@v5 | |
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: gitops@pesca.dev | |
commit_author: PescaDev GitOps <gitops@pesca.dev> |