Skip to content

Commit

Permalink
build: add workflow for release mirror
Browse files Browse the repository at this point in the history
  • Loading branch information
vagetablechicken committed Sep 22, 2023
1 parent a013ba3 commit 34e15d3
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/release-mirror.yml
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 $?

0 comments on commit 34e15d3

Please sign in to comment.