Skip to content

Commit

Permalink
add manual job to freeze image tags and versions (#330)
Browse files Browse the repository at this point in the history
temporarily disable image build on push workflow

Signed-off-by: Yingchun Guo <yingchun.guo@intel.com>
  • Loading branch information
daisy-ycguo authored Aug 21, 2024
1 parent b1182c4 commit c0f5e2f
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 10 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/manual-freeze-tag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

name: Freeze helm release tag in helm charts on manual event

on:
workflow_dispatch:
inputs:
oldappversion:
default: "v0.8"
description: "Old appVersion to be replaced"
required: true
type: string
newappversion:
default: "v0.9"
description: "New appVersion to replace"
required: true
type: string
oldversion:
default: "0.8.0"
description: "Old version to be replaced"
required: true
type: string
newversion:
default: "0.9.0"
description: "New version to replace"
required: true
type: string

jobs:
freeze-tag:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.ref }}

- name: Set up Git
run: |
git config --global user.name "NeuralChatBot"
git config --global user.email "grp_neural_chat_bot@intel.com"
git remote set-url origin https://NeuralChatBot:"${{ secrets.ACTION_TOKEN }}"@github.com/opea-project/GenAIExamples.git
- name: Run script
env:
NEWTAG: ${{ inputs.newappversion }}
run: |
find helm-charts/ -name 'Chart.yaml' -type f -exec sed -i "s#appVersion: \"${{ inputs.oldappversion }}\"#appVersion: \"${{ inputs.newappversion }}\"#g" {} \;
find helm-charts/ -name 'Chart.yaml' -type f -exec sed -i "s#version: ${{ inputs.oldversion }}#version: ${{ inputs.newversion }}#g" {} \;
./helm-charts/update_manifests.sh
- name: Commit changes
run: |
git add .
git commit -s -m "Freeze Helm charts versions"
git push
21 changes: 11 additions & 10 deletions .github/workflows/push-image-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,17 @@
name: Upgrade GMC system on push event

on:
push:
branches: ["main"]
paths:
- microservices-connector/**
- "!microservices-connector/helm/**"
- "!**.md"
- "!**.txt"
- "!**.png"
- "!.**"
- .github/workflows/gmc-on-push.yaml
# push:
# branches: ["main"]
# paths:
# - microservices-connector/**
# - "!microservices-connector/helm/**"
# - "!**.md"
# - "!**.txt"
# - "!**.png"
# - "!.**"
# - .github/workflows/gmc-on-push.yaml
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-on-push
Expand Down

0 comments on commit c0f5e2f

Please sign in to comment.