forked from 4paradigm/OpenMLDB
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: add workflow for release mirror
- Loading branch information
1 parent
a013ba3
commit 34e15d3
Showing
1 changed file
with
37 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# This workflow scp the specified version release files to the match of mirror site | ||
name: Release Mirror | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
inputs: | ||
version: | ||
description: 'release version' | ||
required: false | ||
|
||
jobs: | ||
cp: | ||
runs-on: ubuntu-latest | ||
steps: | ||
# ssh actions have limitations, so we use raw ssh | ||
- name: Configure SSH | ||
run: | | ||
mkdir -p ~/.ssh/ | ||
echo "$SSH_KEY" > ~/.ssh/staging.key | ||
chmod 600 ~/.ssh/staging.key | ||
cat >>~/.ssh/config <<END | ||
Host staging | ||
HostName $SSH_HOST | ||
User $SSH_USER | ||
IdentityFile ~/.ssh/staging.key | ||
StrictHostKeyChecking no | ||
END | ||
env: | ||
SSH_USER: ${{ secrets.STAGING_SSH_USER }} | ||
SSH_KEY: ${{ secrets.STAGING_SSH_KEY }} | ||
SSH_HOST: ${{ secrets.STAGING_SSH_HOST }} | ||
- name: test | ||
run: | | ||
ssh staging 'exit 10' | ||
echo $? | ||