Skip to content

Commit 89a1e30

Browse files
committed
Switch mcli to rustfs cli
1 parent d0423c0 commit 89a1e30

4 files changed

Lines changed: 71 additions & 34 deletions

File tree

.github/workflows/ci.yml

Lines changed: 48 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,21 @@ jobs:
3535
- name: Install Toolchains
3636
run: |
3737
winget install --id=Google.Protobuf -l C:\protobuf --exact --accept-package-agreements --accept-source-agreements
38-
winget install --id=MinIO.Client --exact --accept-package-agreements --accept-source-agreements
39-
echo $Env:APPDATA\..\Local\Microsoft\WinGet\Links | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
4038
echo C:\protobuf\bin | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
4139
40+
# depName=rustfs/cli
41+
$env:RUSTFS_CLI_VERSION="v0.1.12"
42+
$env:RUSTFS_CLI_ZIP_NAME="rustfs-cli-windows-amd64-$env:RUSTFS_CLI_VERSION.zip"
43+
Invoke-WebRequest "https://github.com/rustfs/cli/releases/download/$env:RUSTFS_CLI_VERSION/$env:RUSTFS_CLI_ZIP_NAME" -OutFile "$env:RUSTFS_CLI_ZIP_NAME"
44+
Expand-Archive -Path "$env:RUSTFS_CLI_ZIP_NAME" -DestinationPath C:\Windows\
45+
Remove-Item -Path "$env:RUSTFS_CLI_ZIP_NAME"
46+
4247
- name: Prepare Map
4348
shell: C:\shells\gitbash.exe {0}
4449
run: |
45-
mc alias set yr32srv https://rustfs-s3.yr32.net eewbot-ci "${{ secrets.YR32RUSTFS_EEWBOT_CI_SECRET }}"
50+
rc alias set yr32srv https://rustfs-s3.yr32.net eewbot-ci "${{ secrets.YR32RUSTFS_EEWBOT_CI_SECRET }}"
4651
pushd assets/shapefile/
47-
mc get yr32srv/eewbot/shapefiles_v1.zip ./shapefiles_v1.zip
52+
rc cp yr32srv/eewbot/shapefiles_v1.zip ./shapefiles_v1.zip
4853
7z x ./shapefiles_v1.zip -y
4954
popd
5055
@@ -107,11 +112,11 @@ jobs:
107112
matrix:
108113
include:
109114
- ghimage: ubuntu-24.04
110-
mcarch: amd64
115+
rustfscliarch: amd64
111116
arch_s: x86_64
112117

113118
- ghimage: ubuntu-24.04-arm
114-
mcarch: arm64
119+
rustfscliarch: arm64
115120
arch_s: aarch64
116121

117122
permissions:
@@ -125,11 +130,17 @@ jobs:
125130
submodules: true
126131

127132
- run: |
128-
sudo curl "https://dl.min.io/client/mc/release/linux-${{ matrix.mcarch }}/mc" -o /bin/mc
129-
sudo chmod +x /bin/mc
130-
mc alias set yr32srv https://rustfs-s3.yr32.net eewbot-ci "${{ secrets.YR32RUSTFS_EEWBOT_CI_SECRET }}"
133+
# depName=rustfs/cli
134+
RUSTFS_CLI_VERSION="v0.1.12"
135+
RUSTFS_CLI_TAR_NAME="rustfs-cli-linux-${{ matrix.rustfscliarch }}-$RUSTFS_CLI_VERSION.tar.gz"
136+
wget "https://github.com/rustfs/cli/releases/download/$RUSTFS_CLI_VERSION/$RUSTFS_CLI_TAR_NAME"
137+
tar xf "$RUSTFS_CLI_TAR_NAME"
138+
rm "$RUSTFS_CLI_TAR_NAME"
139+
sudo mv rc /bin/
140+
141+
rc alias set yr32srv https://rustfs-s3.yr32.net eewbot-ci "${{ secrets.YR32RUSTFS_EEWBOT_CI_SECRET }}"
131142
pushd assets/shapefile/
132-
mc get yr32srv/eewbot/shapefiles_v1.zip ./shapefiles_v1.zip
143+
rc cp yr32srv/eewbot/shapefiles_v1.zip ./shapefiles_v1.zip
133144
unzip -o ./shapefiles_v1.zip
134145
popd
135146
sudo apt-get update -y
@@ -193,11 +204,11 @@ jobs:
193204
include:
194205
- ghimage: ubuntu-24.04
195206
dockerarch: linux/amd64
196-
mcarch: amd64
207+
rustfscliarch: amd64
197208

198209
- ghimage: ubuntu-24.04-arm
199210
dockerarch: linux/arm64
200-
mcarch: arm64
211+
rustfscliarch: arm64
201212

202213
permissions:
203214
packages: write
@@ -213,11 +224,17 @@ jobs:
213224
submodules: true
214225

215226
- run: |
216-
sudo curl "https://dl.min.io/client/mc/release/linux-${{ matrix.mcarch }}/mc" -o /bin/mc
217-
sudo chmod +x /bin/mc
218-
mc alias set yr32srv https://rustfs-s3.yr32.net eewbot-ci "${{ secrets.YR32RUSTFS_EEWBOT_CI_SECRET }}"
227+
# depName=rustfs/cli
228+
RUSTFS_CLI_VERSION="v0.1.12"
229+
RUSTFS_CLI_TAR_NAME="rustfs-cli-linux-${{ matrix.rustfscliarch }}-$RUSTFS_CLI_VERSION.tar.gz"
230+
wget "https://github.com/rustfs/cli/releases/download/$RUSTFS_CLI_VERSION/$RUSTFS_CLI_TAR_NAME"
231+
tar xf "$RUSTFS_CLI_TAR_NAME"
232+
rm "$RUSTFS_CLI_TAR_NAME"
233+
sudo mv rc /bin/
234+
235+
rc alias set yr32srv https://rustfs-s3.yr32.net eewbot-ci "${{ secrets.YR32RUSTFS_EEWBOT_CI_SECRET }}"
219236
pushd assets/shapefile/
220-
mc get yr32srv/eewbot/shapefiles_v1.zip ./shapefiles_v1.zip
237+
rc cp yr32srv/eewbot/shapefiles_v1.zip ./shapefiles_v1.zip
221238
unzip -o ./shapefiles_v1.zip
222239
popd
223240
sudo apt-get update -y
@@ -256,11 +273,13 @@ jobs:
256273
include:
257274
- ghimage: ubuntu-24.04
258275
dockerarch: linux/amd64
259-
mcarch: amd64
276+
rustfscliarch: amd64
277+
arch_short: amd64
260278

261279
- ghimage: ubuntu-24.04-arm
262280
dockerarch: linux/arm64
263-
mcarch: arm64
281+
rustfscliarch: arm64
282+
arch_short: arm64
264283

265284
permissions:
266285
packages: write
@@ -276,11 +295,17 @@ jobs:
276295
submodules: true
277296

278297
- run: |
279-
sudo curl "https://dl.min.io/client/mc/release/linux-${{ matrix.mcarch }}/mc" -o /bin/mc
280-
sudo chmod +x /bin/mc
281-
mc alias set yr32srv https://rustfs-s3.yr32.net eewbot-ci "${{ secrets.YR32RUSTFS_EEWBOT_CI_SECRET }}"
298+
# depName=rustfs/cli
299+
RUSTFS_CLI_VERSION="v0.1.12"
300+
RUSTFS_CLI_TAR_NAME="rustfs-cli-linux-${{ matrix.rustfscliarch }}-$RUSTFS_CLI_VERSION.tar.gz"
301+
wget "https://github.com/rustfs/cli/releases/download/$RUSTFS_CLI_VERSION/$RUSTFS_CLI_TAR_NAME"
302+
tar xf "$RUSTFS_CLI_TAR_NAME"
303+
rm "$RUSTFS_CLI_TAR_NAME"
304+
sudo mv rc /bin/
305+
306+
rc alias set yr32srv https://rustfs-s3.yr32.net eewbot-ci "${{ secrets.YR32RUSTFS_EEWBOT_CI_SECRET }}"
282307
pushd assets/shapefile/
283-
mc get yr32srv/eewbot/shapefiles_v1.zip ./shapefiles_v1.zip
308+
rc cp yr32srv/eewbot/shapefiles_v1.zip ./shapefiles_v1.zip
284309
unzip -o ./shapefiles_v1.zip
285310
popd
286311
sudo apt-get update -y
@@ -328,7 +353,7 @@ jobs:
328353
- uses: actions/upload-artifact@v7.0.1
329354
if: ${{ github.event_name != 'pull_request' }}
330355
with:
331-
name: digests-${{ matrix.mcarch }}
356+
name: digests-${{ matrix.arch_short }}
332357
path: /tmp/digests/*
333358
if-no-files-found: error
334359
retention-days: 1

.github/workflows/rendering.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,17 @@ jobs:
2525
sudo apt-get update -y && sudo apt-get install -y xvfb protobuf-compiler libxkbcommon-x11-dev
2626
2727
- run: |
28-
sudo curl "https://dl.min.io/client/mc/release/linux-amd64/mc" -o /bin/mc
29-
sudo chmod +x /bin/mc
30-
mc alias set yr32srv https://rustfs-s3.yr32.net eewbot-ci "${{ secrets.YR32RUSTFS_EEWBOT_CI_SECRET }}"
28+
# depName=rustfs/cli
29+
RUSTFS_CLI_VERSION="v0.1.12"
30+
RUSTFS_CLI_TAR_NAME="rustfs-cli-linux-amd64-$RUSTFS_CLI_VERSION.tar.gz"
31+
wget "https://github.com/rustfs/cli/releases/download/$RUSTFS_CLI_VERSION/$RUSTFS_CLI_TAR_NAME"
32+
tar xf "$RUSTFS_CLI_TAR_NAME"
33+
rm "$RUSTFS_CLI_TAR_NAME"
34+
sudo mv rc /bin/
35+
36+
rc alias set yr32srv https://rustfs-s3.yr32.net eewbot-ci "${{ secrets.YR32RUSTFS_EEWBOT_CI_SECRET }}"
3137
pushd assets/shapefile/
32-
mc get yr32srv/eewbot/shapefiles_v1.zip ./shapefiles_v1.zip
38+
rc cp yr32srv/eewbot/shapefiles_v1.zip ./shapefiles_v1.zip
3339
unzip -o ./shapefiles_v1.zip
3440
popd
3541

.github/workflows/review.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ jobs:
1818
include:
1919
- ghimage: ubuntu-24.04
2020
dockerarch: linux/amd64
21-
mcarch: amd64
21+
rustfscliarch: amd64
2222

2323
- ghimage: ubuntu-24.04-arm
2424
dockerarch: linux/arm64
25-
mcarch: arm64
25+
rustfscliarch: arm64
2626

2727
permissions:
2828
packages: write
@@ -38,11 +38,17 @@ jobs:
3838
submodules: true
3939

4040
- run: |
41-
sudo curl "https://dl.min.io/client/mc/release/linux-${{ matrix.mcarch }}/mc" -o /bin/mc
42-
sudo chmod +x /bin/mc
43-
mc alias set yr32srv https://rustfs-s3.yr32.net eewbot-ci "${{ secrets.YR32RUSTFS_EEWBOT_CI_SECRET }}"
41+
# depName=rustfs/cli
42+
RUSTFS_CLI_VERSION="v0.1.12"
43+
RUSTFS_CLI_TAR_NAME="rustfs-cli-linux-${{ matrix.rustfscliarch }}-$RUSTFS_CLI_VERSION.tar.gz"
44+
wget "https://github.com/rustfs/cli/releases/download/$RUSTFS_CLI_VERSION/$RUSTFS_CLI_TAR_NAME"
45+
tar xf "$RUSTFS_CLI_TAR_NAME"
46+
rm "$RUSTFS_CLI_TAR_NAME"
47+
sudo mv rc /bin/
48+
49+
rc alias set yr32srv https://rustfs-s3.yr32.net eewbot-ci "${{ secrets.YR32RUSTFS_EEWBOT_CI_SECRET }}"
4450
pushd assets/shapefile/
45-
mc get yr32srv/eewbot/shapefiles_v1.zip ./shapefiles_v1.zip
51+
rc cp yr32srv/eewbot/shapefiles_v1.zip ./shapefiles_v1.zip
4652
unzip -o ./shapefiles_v1.zip
4753
popd
4854
sudo apt-get update -y

renovate.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
],
77
"regexManagers": [
88
{
9-
"fileMatch": ["rendering.yml"],
9+
"fileMatch": [".*\\.yml"],
1010
"matchStrings": ["depName=(?<depName>.*?)?\\s.*?_VERSION=\"(?<currentValue>.*?)\""],
1111
"versioningTemplate": "docker",
1212
"datasourceTemplate": "github-releases"

0 commit comments

Comments
 (0)