1
0
Fork 0
mirror of https://github.com/NeoCloud/NeoNetwork synced 2024-11-15 06:02:23 +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 - uses: actions/checkout@v2
with: with:
repository: NeoCloud/NeoNetwork-ROA repository: NeoCloud/NeoNetwork-ROA
ssh-key: ${{ secrets.KEY }}
path: generated path: generated
- name: Install dependencies - name: Install dependencies
@ -30,9 +29,6 @@ jobs:
run: .scripts/generate-roa.sh run: .scripts/generate-roa.sh
- name: Push to NeoCloud/NeoNetwork-ROA - name: Push to NeoCloud/NeoNetwork-ROA
run: | run: .scripts/push-to-roa.sh
cd generated env:
git config user.name "neonet roa bot" SSHPRIVKEY: ${{ secrets.KEY }}
git config user.email "bot@github.com"
git commit -m "Generated at $(TZ='UTC' date +%Y%m%d-%H%M%S.%N)"
git push

View file

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

View file

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