From 1dd93e8c1f192981db699e048f3629e560953a28 Mon Sep 17 00:00:00 2001 From: vdaas-ci <57942646+vdaas-ci@users.noreply.github.com> Date: Fri, 25 Oct 2024 13:53:22 +0900 Subject: [PATCH] Add auto deps version update workflow (#2707) (#2717) * :green_heart: Add auto deps version update workflow * :green_heart: Update make commands * :green_heart: Fix * :green_heart: Add make permission * :green_heart: Add labels * :green_heart: Fix --------- Signed-off-by: vankichi Co-authored-by: Kiichiro YUKAWA --- .../{update-actions.yaml => update-deps.yaml} | 31 ++++++++++++++++--- Makefile | 1 + Makefile.d/dependencies.mk | 12 +++++++ 3 files changed, 40 insertions(+), 4 deletions(-) rename .github/workflows/{update-actions.yaml => update-deps.yaml} (65%) diff --git a/.github/workflows/update-actions.yaml b/.github/workflows/update-deps.yaml similarity index 65% rename from .github/workflows/update-actions.yaml rename to .github/workflows/update-deps.yaml index 8500981889..2d75286f7d 100644 --- a/.github/workflows/update-actions.yaml +++ b/.github/workflows/update-deps.yaml @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # -name: Update Actions version +name: Update Dependencies version on: workflow_dispatch: schedule: @@ -40,7 +40,18 @@ jobs: git_commit_gpgsign: true - name: Run update command run: | - make update/actions + make files + make update + make helm/schema/all + make k8s/manifest/update + make k8s/manifest/helm-operator/update + make k8s/manifest/benchmark-operator/update + make helm/docs/vald + make helm/docs/vald-helm-operator + make helm/docs/vald-benchmark-operator + make license + make format + make perm - name: Check difference id: check_diff run: | @@ -50,6 +61,17 @@ jobs: git diff && git status echo "HAS_GIT_DIFF=true" >> $GITHUB_OUTPUT fi + - name: Get Label + id: pr-label + if: ${{ steps.check_diff.outputs.HAS_GIT_DIFF == 'true' }} + run: | + LATEST=$(make version/vald | grep -o -E "[0-9]+\.[0-9]+") + if ${LATEST} eq "1.7"; then + echo "LABELS=release/v${LATEST}" >> $GITHUB_OUTPUT + else + SUPPORT=$(echo ${LATEST} | awk '{print $1-0.1}') + echo "LABELS=actions/backport/release/v${LATEST},release/v${SUPPORT}" >> $GITHUB_OUTPUT + fi - name: Create PR if: ${{ steps.check_diff.outputs.HAS_GIT_DIFF == 'true' }} uses: peter-evans/create-pull-request@v7 @@ -60,5 +82,6 @@ jobs: signoff: true delete-branch: true base: main - title: "Update Actions dependency" - body: "Automated pull request to update Actions." + title: "Update libs dependency" + body: "Automated pull request to update Dependencies." + labels: ${{ steps.pr-label.outputs.LABELS }} diff --git a/Makefile b/Makefile index 014c9400de..06dbc5bf4b 100644 --- a/Makefile +++ b/Makefile @@ -496,6 +496,7 @@ update: \ deps \ update/template \ go/deps \ + go/example/deps \ rust/deps \ format diff --git a/Makefile.d/dependencies.mk b/Makefile.d/dependencies.mk index 596e9ec1b2..441bbf90ff 100644 --- a/Makefile.d/dependencies.mk +++ b/Makefile.d/dependencies.mk @@ -17,6 +17,7 @@ .PHONY: update/libs ## update vald libraries including tools update/libs: \ + update/buf \ update/chaos-mesh \ update/cmake \ update/docker \ @@ -38,6 +39,7 @@ update/libs: \ update/reviewdog \ update/rust \ update/telepresence \ + update/usearch \ update/vald \ update/yq \ update/zlib @@ -151,6 +153,11 @@ update/helm-docs: update/protobuf: curl -fsSL https://api.github.com/repos/protocolbuffers/protobuf/releases/latest | grep -Po '"tag_name": "\K.*?(?=")' | sed 's/v//g' > $(ROOTDIR)/versions/PROTOBUF_VERSION +.PHONY: update/buf +## update buf version +update/buf: + curl -fsSL https://api.github.com/repos/bufbuild/buf/releases/latest | grep -Po '"tag_name": "\K.*?(?=")' > $(ROOTDIR)/versions/BUF_VERSION + .PHONY: update/kind ## update kind (kubernetes in docker) version update/kind: @@ -191,6 +198,11 @@ update/ngt: update/faiss: curl -fsSL https://api.github.com/repos/facebookresearch/faiss/releases/latest | grep -Po '"tag_name": "\K.*?(?=")' | sed 's/v//g' > $(ROOTDIR)/versions/FAISS_VERSION +.PHONY: update/usearch +## update usearch version +update/usearch: + curl -fsSL https://api.github.com/repos/unum-cloud/usearch/releases/latest | grep -Po '"tag_name": "\K.*?(?=")' | sed 's/v//g' > $(ROOTDIR)/versions/USEARCH_VERSION + .PHONY: update/cmake ## update CMAKE version update/cmake: