mirror of
https://github.com/alibaba/higress.git
synced 2026-02-24 20:50:51 +08:00
38 lines
1.5 KiB
YAML
38 lines
1.5 KiB
YAML
name: Deploy Standalone to OSS
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- "v*.*.*"
|
|
workflow_dispatch: ~
|
|
|
|
jobs:
|
|
deploy-to-oss:
|
|
runs-on: ubuntu-latest
|
|
environment:
|
|
name: oss
|
|
steps:
|
|
# Step 1
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
# Step 2
|
|
- id: package
|
|
name: Prepare Standalone Package
|
|
run: |
|
|
mkdir ./artifact
|
|
LOCAL_RELEASE_URL="https://github.com/higress-group/higress-standalone/releases"
|
|
VERSION=$(curl -Ls $LOCAL_RELEASE_URL | grep 'href="/higress-group/higress-standalone/releases/tag/v[0-9]*.[0-9]*.[0-9]*\"' | sed -E 's/.*\/higress-group\/higress-standalone\/releases\/tag\/(v[0-9\.]+)".*/\1/g' | head -1)
|
|
DOWNLOAD_URL="https://github.com/higress-group/higress-standalone/archive/refs/tags/${VERSION}.tar.gz"
|
|
curl -SsL "$DOWNLOAD_URL" -o "./artifact/higress-${VERSION}.tar.gz"
|
|
curl -SsL "https://raw.githubusercontent.com/higress-group/higress-standalone/refs/heads/main/src/get-higress.sh" -o "./artifact/get-higress.sh"
|
|
echo -n "$VERSION" > ./artifact/VERSION
|
|
echo "Version=$VERSION"
|
|
# Step 3
|
|
- name: Upload to OSS
|
|
uses: doggycool/ossutil-github-action@master
|
|
with:
|
|
ossArgs: 'cp -r -u ./artifact/ oss://higress-website-cn-hongkong/standalone/'
|
|
accessKey: ${{ secrets.ACCESS_KEYID }}
|
|
accessSecret: ${{ secrets.ACCESS_KEYSECRET }}
|
|
endpoint: oss-cn-hongkong.aliyuncs.com
|