fix: fix ali oss config

This commit is contained in:
overtrue
2025-06-18 20:49:25 +08:00
parent 039108ee5e
commit 3a68060e58

View File

@@ -7,7 +7,7 @@ on:
push:
branches:
- main
tags: [ "v*", "*" ]
tags: ["v*", "*"]
jobs:
build-rustfs:
@@ -15,44 +15,116 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
os: [ubuntu-latest, macos-latest, windows-latest]
variant:
- { profile: release, target: x86_64-unknown-linux-musl, glibc: "default" }
- { profile: release, target: x86_64-unknown-linux-gnu, glibc: "default" }
- {
profile: release,
target: x86_64-unknown-linux-musl,
glibc: "default",
}
- {
profile: release,
target: x86_64-unknown-linux-gnu,
glibc: "default",
}
- { profile: release, target: aarch64-apple-darwin, glibc: "default" }
#- { profile: release, target: aarch64-unknown-linux-gnu, glibc: "default" }
- { profile: release, target: aarch64-unknown-linux-musl, glibc: "default" }
- {
profile: release,
target: aarch64-unknown-linux-musl,
glibc: "default",
}
#- { profile: release, target: x86_64-pc-windows-msvc, glibc: "default" }
exclude:
# Linux targets on non-Linux systems
- os: macos-latest
variant: { profile: release, target: x86_64-unknown-linux-gnu, glibc: "default" }
variant:
{
profile: release,
target: x86_64-unknown-linux-gnu,
glibc: "default",
}
- os: macos-latest
variant: { profile: release, target: x86_64-unknown-linux-musl, glibc: "default" }
variant:
{
profile: release,
target: x86_64-unknown-linux-musl,
glibc: "default",
}
- os: macos-latest
variant: { profile: release, target: aarch64-unknown-linux-gnu, glibc: "default" }
variant:
{
profile: release,
target: aarch64-unknown-linux-gnu,
glibc: "default",
}
- os: macos-latest
variant: { profile: release, target: aarch64-unknown-linux-musl, glibc: "default" }
variant:
{
profile: release,
target: aarch64-unknown-linux-musl,
glibc: "default",
}
- os: windows-latest
variant: { profile: release, target: x86_64-unknown-linux-gnu, glibc: "default" }
variant:
{
profile: release,
target: x86_64-unknown-linux-gnu,
glibc: "default",
}
- os: windows-latest
variant: { profile: release, target: x86_64-unknown-linux-musl, glibc: "default" }
variant:
{
profile: release,
target: x86_64-unknown-linux-musl,
glibc: "default",
}
- os: windows-latest
variant: { profile: release, target: aarch64-unknown-linux-gnu, glibc: "default" }
variant:
{
profile: release,
target: aarch64-unknown-linux-gnu,
glibc: "default",
}
- os: windows-latest
variant: { profile: release, target: aarch64-unknown-linux-musl, glibc: "default" }
variant:
{
profile: release,
target: aarch64-unknown-linux-musl,
glibc: "default",
}
# Apple targets on non-macOS systems
- os: ubuntu-latest
variant: { profile: release, target: aarch64-apple-darwin, glibc: "default" }
variant:
{
profile: release,
target: aarch64-apple-darwin,
glibc: "default",
}
- os: windows-latest
variant: { profile: release, target: aarch64-apple-darwin, glibc: "default" }
variant:
{
profile: release,
target: aarch64-apple-darwin,
glibc: "default",
}
# Windows targets on non-Windows systems
- os: ubuntu-latest
variant: { profile: release, target: x86_64-pc-windows-msvc, glibc: "default" }
variant:
{
profile: release,
target: x86_64-pc-windows-msvc,
glibc: "default",
}
- os: macos-latest
variant: { profile: release, target: x86_64-pc-windows-msvc, glibc: "default" }
variant:
{
profile: release,
target: x86_64-pc-windows-msvc,
glibc: "default",
}
steps:
- name: Checkout repository
@@ -89,7 +161,7 @@ jobs:
if: steps.cache-protoc.outputs.cache-hit != 'true'
uses: arduino/setup-protoc@v3
with:
version: '31.1'
version: "31.1"
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Flatc
@@ -296,6 +368,12 @@ jobs:
fi
echo "ossutil2 installation completed"
# Set the OSS configuration
ossutil config set Region oss-cn-beijing
ossutil config set endpoint oss-cn-beijing.aliyuncs.com
ossutil config set accessKeyID ${{ secrets.ALICLOUDOSS_KEY_ID }}
ossutil config set accessKeySecret ${{ secrets.ALICLOUDOSS_KEY_SECRET }}
- name: Upload to Aliyun OSS
if: startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/main'
shell: bash
@@ -438,10 +516,9 @@ jobs:
ossutil cp "${{ steps.build_gui.outputs.gui_artifact_name }}.zip" "oss://rustfs-artifacts/artifacts/rustfs/${{ steps.build_gui.outputs.gui_artifact_name }}.latest.zip" --force
echo "Successfully uploaded GUI artifacts to OSS"
merge:
runs-on: ubuntu-latest
needs: [ build-rustfs ]
needs: [build-rustfs]
if: startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/upload-artifact/merge@v4