From a2c6503664e18c23a146df949f4bd14ffd3b7dcf Mon Sep 17 00:00:00 2001 From: Julien Semaan Date: Sat, 23 Mar 2024 12:18:42 -0400 Subject: [PATCH] work on pr_afn_k8s --- .github/workflows/docker-admin.yaml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docker-admin.yaml b/.github/workflows/docker-admin.yaml index 6bea470..aa72db6 100644 --- a/.github/workflows/docker-admin.yaml +++ b/.github/workflows/docker-admin.yaml @@ -68,10 +68,11 @@ jobs: CHANGE_TYPE: admin run: | BRANCH_ID=`date "+%Y%m%d"` + BRANCH_NAME=tmp/$BRANCH_ID # Checkout the remote ref if it already exist, otherwise, start from main - git checkout origin/tmp/$BRANCH_ID || true - git checkout -b tmp/$BRANCH_ID + git checkout origin/$BRANCH_NAME || true + git checkout -b $BRANCH_NAME yq -i '.lb.'$CHANGE_TYPE'.image.tag = "'$IMG_TAG'"' charts/afn/values.yaml @@ -80,6 +81,6 @@ jobs: git commit --allow-empty -a -m "bump $CHANGE_TYPE to $IMG_TAG" git push origin HEAD - (gh pr list --state open --limit 1 --head tmp/$BRANCH_ID | grep tmp/$BRANCH_ID) || \ - gh pr create -B main -H tmp/$BRANCH_ID --title "Update images $BRANCH_ID" --body 'Created by Github action' + (gh pr list --state open --limit 1 --head $BRANCH_NAME | grep $BRANCH_NAME) || \ + gh pr create -B main -H $BRANCH_NAME --title "Update images $BRANCH_ID" --body 'Created by Github action'