From e291017c032778d83f7889804ca550a86c8063d1 Mon Sep 17 00:00:00 2001 From: "Alyssa.Yu" Date: Wed, 24 Apr 2024 11:23:15 -0700 Subject: [PATCH 1/3] fix the metadata update github action --- .github/workflows/update-metadata.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update-metadata.yml b/.github/workflows/update-metadata.yml index 3536aab..0df8642 100644 --- a/.github/workflows/update-metadata.yml +++ b/.github/workflows/update-metadata.yml @@ -22,7 +22,7 @@ jobs: NEW_VERSION=" - sha: $SHA\n changeNotes: $MESSAGE" echo "New version info to be added: \n" echo "$NEW_VERSION" - sed -i "s/versions:/versions:\n$NEW_VERSION/" metadata.yaml + sed -i "s|versions:|versions:\n$NEW_VERSION|" metadata.yaml - name: Commit and push if changed run: | From d9ff3b7326bddebc544c0ca05ba574534fac572a Mon Sep 17 00:00:00 2001 From: "Alyssa.Yu" Date: Wed, 24 Apr 2024 12:17:52 -0700 Subject: [PATCH 2/3] update the metadata with the previous commit message instead of the latest merge commit message --- .github/workflows/update-metadata.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update-metadata.yml b/.github/workflows/update-metadata.yml index 0df8642..3b90812 100644 --- a/.github/workflows/update-metadata.yml +++ b/.github/workflows/update-metadata.yml @@ -18,7 +18,7 @@ jobs: - name: Update metadata.yaml run: | SHA=$(git rev-parse HEAD) - MESSAGE=$(git log -1 --pretty=%B) + MESSAGE=$(git log --skip=1 --max-count=1 --pretty=%B) NEW_VERSION=" - sha: $SHA\n changeNotes: $MESSAGE" echo "New version info to be added: \n" echo "$NEW_VERSION" From 7d81e0a50a4882d5ddafd539427ad9591583ce31 Mon Sep 17 00:00:00 2001 From: "Alyssa.Yu" Date: Tue, 30 Apr 2024 16:47:05 -0700 Subject: [PATCH 3/3] Make the update metadata CI manually triggered --- .github/workflows/update-metadata.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/update-metadata.yml b/.github/workflows/update-metadata.yml index 3b90812..59386e5 100644 --- a/.github/workflows/update-metadata.yml +++ b/.github/workflows/update-metadata.yml @@ -1,11 +1,7 @@ name: Update Metadata on: - push: - branches: - - main - paths: - - template.tpl # The workflow should only trigger on changes to template.tpl + workflow_dispatch: jobs: update-metadata: