This is an automated email from the ASF dual-hosted git repository.

pcongiusti pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-k-runtime.git


The following commit(s) were added to refs/heads/main by this push:
     new 8b12e45c fix(ci): tasks name
8b12e45c is described below

commit 8b12e45cae0775d61b42ca95629372e5f99943df
Author: Pasquale Congiusti <[email protected]>
AuthorDate: Mon Jul 3 10:54:34 2023 +0200

    fix(ci): tasks name
---
 .github/workflows/nightly-automatic-updates.yml | 4 ++--
 scripts/release-branch.sh                       | 9 ++++++---
 2 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/.github/workflows/nightly-automatic-updates.yml 
b/.github/workflows/nightly-automatic-updates.yml
index f3f116c6..9fdaf48b 100644
--- a/.github/workflows/nightly-automatic-updates.yml
+++ b/.github/workflows/nightly-automatic-updates.yml
@@ -40,7 +40,7 @@ jobs:
         branch-ref: "main"
         secretGithubToken: ${{ secrets.GITHUB_TOKEN }}
 
-  release-1.17.x:
+  release-1_17_x:
     if: github.repository == 'apache/camel-k-runtime'
     runs-on: ubuntu-20.04
     name: Automatic updates on release-1.17.x branch
@@ -57,7 +57,7 @@ jobs:
         branch-ref: "release-1.17.x"
         secretGithubToken: ${{ secrets.GITHUB_TOKEN }}
 
-  release-1.15.x:
+  release-1_15_x:
     if: github.repository == 'apache/camel-k-runtime'
     runs-on: ubuntu-20.04
     name: Automatic updates on release-1.15.x branch
diff --git a/scripts/release-branch.sh b/scripts/release-branch.sh
index 3f5c097d..726441fd 100755
--- a/scripts/release-branch.sh
+++ b/scripts/release-branch.sh
@@ -33,17 +33,20 @@ main() {
   VERSION_MM="${BASH_REMATCH[1]}.${BASH_REMATCH[2]}"
 
   new_release_branch="release-$VERSION_MM.x"
+  new_release="$(echo "$VERSION_MM" | tr \. _)_x"
   # Create release branch
   git checkout -b $new_release_branch
 
   # Support nightly CI tasks
   # pick the oldest release (we will replace it)
-  oldest_release_branch=$(yq '.jobs[] | key | select ( . !="main" )' 
$location/../.github/workflows/nightly-automatic-updates.yml | sort | head -1)
-  echo "Swapping GH actions tasks from $oldest_release_branch to 
$new_release_branch"
+  oldest_release=$(yq '.jobs[] | key | select ( . !="main" )' 
$location/../.github/workflows/nightly-automatic-updates.yml | sort | head -1)
+  oldest_release_branch=$(yq 
".jobs[\"$oldest_release\"].steps[1].with.branch-ref" 
$location/../.github/workflows/nightly-automatic-updates.yml)
+  echo "Swapping GH actions tasks from $oldest_release to $new_release, 
$oldest_release_branch to $new_release_branch"
 
+  sed -i "s/$oldest_release/$new_release/g" 
$location/../.github/workflows/nightly-automatic-updates.yml
   sed -i "s/$oldest_release_branch/$new_release_branch/g" 
$location/../.github/workflows/nightly-automatic-updates.yml
 
-  if [ $DRY_RUN == "true" ]
+  if [ $DRYRUN == "true" ]
   then
     echo "❗ dry-run mode on, won't push any change!"
   else

Reply via email to