mirror of
https://github.com/actions/checkout.git
synced 2026-07-01 18:01:44 +00:00
add update-kubernetes-manifest job to deploy-pr
This commit is contained in:
parent
28f2ef1e14
commit
4692b5bf51
26
.github/workflows/deploy-pr.yml
vendored
26
.github/workflows/deploy-pr.yml
vendored
@ -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 }}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user