Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
jo-bisonai committed May 28, 2024
1 parent 6f1f397 commit b1e3128
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions .github/workflows/update.image-tag.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ on:
type: string
tag_git_hash:
required: false
type: string
type: string
secrets:
PAT:
required: true
required: true

jobs:
update-image-tag:
Expand All @@ -32,7 +32,7 @@ jobs:

permissions:
id-token: write
contents: read
contents: read

steps:
- name: Checkout gitops
Expand All @@ -54,8 +54,8 @@ jobs:
cd ./gitops_tmp/${{ inputs.project-name }}/
echo "Updating image tag in values.${{ inputs.network }}.yaml files"
if [[ "${{ inputs.network}}" == "cypress" ]]; then
if [[ "${{ inputs.project-name }}" == "vrf" || "${{ inputs.project-name }}" == "request-response" || "${{ inputs.project-name }}" == "aggregator" ]]; then
listener_baobab_tag=$(grep -oP 'listenerTag: "\K[^"]+' values.baobab.yaml)
sed -i 's/listenerTag: .*$/listenerTag: "$listener_baobab_tag"/g' values.${{ inputs.network }}.yaml
Expand All @@ -64,17 +64,20 @@ jobs:
worker_baobab_tag=$(grep -oP 'workerTag: "\K[^"]+' values.baobab.yaml)
sed -i 's/workerTag: .*$/workerTag: "$worker_baobab_tag"/g' values.${{ inputs.network }}.yaml
fi
baobab_tag=$(grep -oP 'tag: "\K[^"]+' values.baobab.yaml)
baobab_tag=$(grep -oP 'tag: "\K[^"]+' values.baobab.yaml)
sed -i "s/tag: \".*\"/tag: \"$baobab_tag\"/" values.${{ inputs.network }}.yaml
else
if [[ "${{ inputs.project-name }}" == "vrf" || "${{ inputs.project-name }}" == "request-response" || "${{ inputs.project-name }}" == "aggregator" ]]; then
sed -i 's/listenerTag: .*$/listenerTag: "${{ inputs.image-tag }}"/g' values.${{ inputs.network }}.yaml
sed -i 's/reporterTag: .*$/reporterTag: "${{ inputs.image-tag }}"/g' values.${{ inputs.network }}.yaml
sed -i 's/workerTag: .*$/workerTag: "${{ inputs.image-tag }}"/g' values.${{ inputs.network }}.yaml
fi
fi
sed -i 's/tag: .*$/tag: "${{ inputs.image-tag }}"/g' values.${{ inputs.network }}.yaml
fi
shell: bash

Expand All @@ -86,4 +89,4 @@ jobs:
git add .
git commit -m 'v${{ inputs.version }}.${{ inputs.tag_date }}.${{ inputs.tag_git_hash }} is updated'
git push origin idc-fly
shell: bash
shell: bash

0 comments on commit b1e3128

Please sign in to comment.