Skip to content

Commit

Permalink
Add auto deps version update workflow (#2707) (#2717)
Browse files Browse the repository at this point in the history
* 💚 Add auto deps version update workflow



* 💚 Update make commands



* 💚 Fix



* 💚 Add make permission



* 💚 Add labels



* 💚 Fix



---------

Signed-off-by: vankichi <[email protected]>
Co-authored-by: Kiichiro YUKAWA <[email protected]>
  • Loading branch information
vdaas-ci and vankichi authored Oct 25, 2024
1 parent c845e81 commit 1dd93e8
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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: |
Expand All @@ -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
Expand All @@ -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 }}
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,7 @@ update: \
deps \
update/template \
go/deps \
go/example/deps \
rust/deps \
format

Expand Down
12 changes: 12 additions & 0 deletions Makefile.d/dependencies.mk
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
.PHONY: update/libs
## update vald libraries including tools
update/libs: \
update/buf \
update/chaos-mesh \
update/cmake \
update/docker \
Expand All @@ -38,6 +39,7 @@ update/libs: \
update/reviewdog \
update/rust \
update/telepresence \
update/usearch \
update/vald \
update/yq \
update/zlib
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 1dd93e8

Please sign in to comment.