1
0
Fork 0
mirror of https://github.com/NeoCloud/NeoNetwork synced 2024-12-23 20:19:24 +08:00

update scripts

This commit is contained in:
Septs 2020-07-21 00:40:22 +08:00
parent ffd99e4134
commit 73ac665c31
3 changed files with 11 additions and 15 deletions

View file

@ -18,7 +18,6 @@ jobs:
- uses: actions/checkout@v2
with:
repository: NeoCloud/NeoNetwork-ROA
ssh-key: ${{ secrets.KEY }}
path: generated
- name: Install dependencies
@ -30,9 +29,6 @@ jobs:
run: .scripts/generate-roa.sh
- name: Push to NeoCloud/NeoNetwork-ROA
run: |
cd generated
git config user.name "neonet roa bot"
git config user.email "bot@github.com"
git commit -m "Generated at $(TZ='UTC' date +%Y%m%d-%H%M%S.%N)"
git push
run: .scripts/push-to-roa.sh
env:
SSHPRIVKEY: ${{ secrets.KEY }}

View file

@ -1,11 +1,8 @@
# This is a basic workflow to help you get started with Actions
name: Test Your PR
on:
pull_request:
branches:
- master
branches: [master]
jobs:
build:

View file

@ -1,17 +1,20 @@
#!/usr/bin/env bash
set -xeuo pipefail
set -euo pipefail
IFS=$'\n\t'
pushd roa_dir
if [ -n "$SSHPRIVKEY" ]; then
echo SSHPRIVKEY is not set
exit 1
fi
mkdir -p "$HOME/.ssh"
echo "$SSHPRIVKEY" | base64 -d >"$HOME/.ssh/id_ed25519"
chmod 0600 "$HOME/.ssh/id_ed25519"
ssh -o StrictHostKeyChecking=no git@github.com || true
git init && git add .
set -x
pushd generated
git add .
git config user.name "neonet roa bot"
git config user.email "bot@github.com"
git commit -m "Generated at $(TZ='UTC' date +%Y%m%d-%H%M%S.%N)"