🍰 Release #42
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 🔄 Sync to OSS | |
on: | |
push: | |
tags: | |
- 'v*.*.*' | |
workflow_dispatch: | |
inputs: | |
sync-docker: | |
description: 'can sync docker-compose.zip' | |
required: false | |
default: 'true' | |
sync-install: | |
description: 'can sync install.sh' | |
required: false | |
default: 'true' | |
version: | |
description: 'version(eg: v0.0.1)' | |
required: true | |
jobs: | |
update: | |
name: Sync to OSS | |
runs-on: ubuntu-latest | |
steps: | |
- name: default Checkout | |
uses: actions/checkout@v4 | |
- name: Version tag | |
id: version | |
run: | | |
if [[ -n "${GITHUB_REF##refs/tags/v*}" ]]; then | |
echo ::set-output name=version::${GITHUB_REF#refs/tags/v} | |
else | |
echo ::set-output name=version::${${{ inputs.version }}#v} | |
fi | |
- name: tar docker-compose.tar.gz | |
run: | | |
cd docker-compose | |
tar -czvf ~/docker-compose.tar.gz * .[!.]* | |
cp ~/docker-compose.tar.gz ~/docker-compose.${{ steps.version.outputs.version }}.tar.gz | |
- name: Sync docker-compose.tar.gz to OSS | |
uses: hexf00/upload-to-oss@v1 | |
with: | |
source: '~/docker-compose-test.tar.gz' | |
dest: 'release/docker-compose.tar.gz' | |
bucket: ${{secrets.OSS_BUCKET}} | |
region: "oss-cn-shenzhen" | |
accessKeyId: ${{secrets.S3_ACCESS_KEY_ID}} | |
accessKeySecret: ${{secrets.S3_ACCESS_KEY_SECRET}} | |
if: ${{ github.event.inputs.sync-docker == 'true' }} | |
- name: Sync docker-compose.${{ steps.version.outputs.version }}.tar.gz to OSS | |
uses: hexf00/upload-to-oss@v1 | |
with: | |
source: '~/docker-compose-test.${{ steps.version.outputs.version }}.tar.gz' | |
dest: 'release/docker-compose.${{ steps.version.outputs.version }}.tar.gz' | |
bucket: ${{secrets.OSS_BUCKET}} | |
region: "oss-cn-shenzhen" | |
accessKeyId: ${{secrets.S3_ACCESS_KEY_ID}} | |
accessKeySecret: ${{secrets.S3_ACCESS_KEY_SECRET}} | |
if: ${{ github.event.inputs.sync-docker == 'true' }} | |
- name: Sync install.sh to OSS | |
uses: hexf00/upload-to-oss@v1 | |
with: | |
source: 'install.sh' | |
dest: tool/install.sh | |
bucket: ${{secrets.OSS_BUCKET}} | |
region: "oss-cn-shenzhen" | |
accessKeyId: ${{secrets.S3_ACCESS_KEY_ID}} | |
accessKeySecret: ${{secrets.S3_ACCESS_KEY_SECRET}} | |
if: ${{ github.event.inputs.sync-install == 'true' }} | |
- name: Sync get-docker/get-docker-official-script.sh to OSS | |
uses: hexf00/upload-to-oss@v1 | |
with: | |
source: 'get-docker/get-docker-official-script.sh' | |
dest: tool/get-docker-official-script.sh | |
bucket: ${{secrets.OSS_BUCKET}} | |
region: "oss-cn-shenzhen" | |
accessKeyId: ${{secrets.S3_ACCESS_KEY_ID}} | |
accessKeySecret: ${{secrets.S3_ACCESS_KEY_SECRET}} | |
if: ${{ github.event.inputs.sync-install == 'true' }} | |
- name: Sync get-docker/get-docker.sh to OSS | |
uses: hexf00/upload-to-oss@v1 | |
with: | |
source: 'get-docker/get-docker.sh' | |
dest: tool/get-docker.sh | |
bucket: ${{secrets.OSS_BUCKET}} | |
region: "oss-cn-shenzhen" | |
accessKeyId: ${{secrets.S3_ACCESS_KEY_ID}} | |
accessKeySecret: ${{secrets.S3_ACCESS_KEY_SECRET}} | |
if: ${{ github.event.inputs.sync-install == 'true' }} | |
# update-chart: | |
# name: Sync helm chart to oci | |
# runs-on: ubuntu-latest | |
# steps: | |
# - name: default Checkout | |
# uses: actions/checkout@v4 | |
# - name: Login to Aliyun Container Registry (ACR) | |
# uses: aliyun/acr-login@v1 | |
# with: | |
# login-server: univer-acr-registry.cn-shenzhen.cr.aliyuncs.com | |
# region-id: cn-shenzhen | |
# username: "${{ secrets.REGISTRY_USERNAME }}" | |
# password: "${{ secrets.REGISTRY_PASSWORD }}" | |
# - name: Sync helm chart to oci | |
# run: | | |
# helm repo add istio https://istio-release.storage.googleapis.com/charts | |
# helm repo update | |
# make all |