Skip to content

Deploy Existing Image #14

Deploy Existing Image

Deploy Existing Image #14

name: Deploy Existing Image
on:
workflow_dispatch:
inputs:
image_tag:
description: 'Image tag to deploy (e.g. v1.2.3 or sha-abc123)'
required: true
type: string
permissions:
contents: write
jobs:
deploy:
runs-on: [mend-self-hosted, profile=sast-qa]
env:
IMAGE_TAG: ${{ github.event.inputs.image_tag }}
steps:
- name: Checkout mend/helm-charts
uses: actions/checkout@v4
with:
repository: mend/helm-charts
ref: main
path: helm-charts-clone
token: ${{ secrets.GH_TOKEN }} # must be defined and have write to mend/helm-charts
- name: Update image tag and push
run: |
cd ./helm-charts-clone/values/reportportal-mcp-server/infra
# Update tag
sed -i 's/tag: .*/tag: '"${IMAGE_TAG}"'/g' ./values-infra-dev.yaml
# Commit and push
git config --global user.name 'AutoRelease'
git config --global user.email 'AutoRelease'
git add .
git commit -m "GH Actions AutoRelease ${IMAGE_TAG}" || echo "No changes to commit"
git push