Skip to content

Commit 2c7928d

Browse files
committed
chore(ci): fix spdlog version + update workflow
1 parent 18f3e14 commit 2c7928d

4 files changed

Lines changed: 49 additions & 5 deletions

File tree

.github/workflows/build.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,17 @@ jobs:
2727
uses: actions/cache@v4
2828
with:
2929
path: .github/workflows/deps/install_dir
30-
key: ${{ env.OPENCV_GIT_TAG }}-${{ env.YAML_GIT_TAG }}-${{ env.ARGPARSE_GIT_TAG }}
30+
key: ${{ env.OPENCV_GIT_TAG }}-${{ env.YAML_GIT_TAG }}-${{ env.ARGPARSE_GIT_TAG }}-${{ env.SPDLOG_GIT_TAG }}
3131

3232
- name: Build lib dependencis
3333
if: ${{ steps.deps-cache.outputs.cache-hit != 'true' }}
3434
run: |
3535
cd .github/workflows/deps
3636
cmake . -B build -GNinja \
37-
-DOPENCV_GIT_TAG=${{ env.OPENCV_GIT_TAG }} -DYAML_GIT_TAG=${{ env.YAML_GIT_TAG }} -DARGPARSE_GIT_TAG=${{ env.ARGPARSE_GIT_TAG }}
37+
-DOPENCV_GIT_TAG=${{ env.OPENCV_GIT_TAG }} \
38+
-DYAML_GIT_TAG=${{ env.YAML_GIT_TAG }} \
39+
-DARGPARSE_GIT_TAG=${{ env.ARGPARSE_GIT_TAG }} \
40+
-DSPDLOG_GIT_TAG=${{ env.SPDLOG_GIT_TAG }}
3841
ninja -C build
3942
cd -
4043

.github/workflows/depend-argparse.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Update YAML
1+
name: Update argparse
22
on:
33
workflow_dispatch:
44
schedule:
@@ -31,7 +31,7 @@ jobs:
3131
branch: "argparse-${{ env.VERSION }}"
3232
commit-message: "chore(ci): update argparse to ${{ env.VERSION }}"
3333
body: |
34-
Update YAML to ${{ env.VERSION }}.
34+
Update argparse to ${{ env.VERSION }}.
3535
3636
This PR has been created automatically.
3737
committer: github-actions[bot] <noreply@github.com>
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Update spdlog
2+
on:
3+
workflow_dispatch:
4+
schedule:
5+
- cron: '0 7 * * *'
6+
7+
jobs:
8+
update-yaml:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
13+
- name: Fetch release version
14+
env:
15+
GITHUB_TOKEN: ${{ github.token }}
16+
OWNER: gabine
17+
REPO: spdlog
18+
run: |
19+
VERSION=$(gh api "/repos/$OWNER/$REPO/releases/latest" --jq ".tag_name")
20+
echo "VERSION=$VERSION" >> "$GITHUB_ENV"
21+
22+
- name: Modify file if new version
23+
run: |
24+
sed -E -i "s@(SPDLOG_GIT_TAG=\s+\")(v[0-9]+\.[0-9]+\.[0-9]+)(\")@\1$VERSION\3@" .github/workflows/deps/version.env
25+
26+
- name: Create PR if new version
27+
uses: peter-evans/create-pull-request@v6
28+
with:
29+
token: ${{ secrets.PAT }}
30+
title: "chore(ci): update spdlog to ${{ env.VERSION }}"
31+
branch: "spdlog-${{ env.VERSION }}"
32+
commit-message: "chore(ci): update spdlog to ${{ env.VERSION }}"
33+
body: |
34+
Update spdlog to ${{ env.VERSION }}.
35+
36+
This PR has been created automatically.
37+
committer: github-actions[bot] <noreply@github.com>
38+
author: github-actions[bot] <noreply@github.com>
39+
assignees: "EmixamPP"
40+
labels: dependencies
41+
delete-branch: true

.github/workflows/deps/version.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
OPENCV_GIT_TAG="4.9.0"
22
YAML_GIT_TAG="0.8.0"
33
ARGPARSE_GIT_TAG="v3.0"
4-
SPDLOG_GIT_TAG="1.14.1"
4+
SPDLOG_GIT_TAG="v1.14.1"

0 commit comments

Comments
 (0)