add update-kubernetes-manifest job to deploy-pr

This commit is contained in:
Apteryx-nz 2026-06-28 15:18:03 +09:00
parent 28f2ef1e14
commit 4692b5bf51

View File

@ -11,6 +11,8 @@ env:
jobs:
build-and-push-image:
outputs:
IMAGE_FULL_NAME: ${{ steps.meta.outputs.tags }}
runs-on: ubuntu-latest
steps:
- name: Checkout repository
@ -41,3 +43,27 @@ jobs:
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
update-kubenetes-manifest:
runs-on: ubuntu-latest
needs: [build-and-push-image]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Update fastapi-sample image
env:
IMAGE_FULL_NAME: ${{ needs.build-and-push-image.outputs.IMAGE_FULL_NAME }}}}
run: |
yq -i "(.spec.template.spec.containers[] | select(.name == \"fastapi-sample\")).image = \"$IMAGE_FULL_NAME"" manifest/fasta
pi-sample/deployment.yaml
- name: Create PR
uses: peter-evans/create-pull-request@v5
with:
base: main
title: "Upagete fasapi-sample"
draft: true
body: |
# Changes
- Upate 'fastapi-sample' image to ${{ needs.build-and-push-image.outputs.IMAGE_FULL_NAME }}