switch to secret access token for auth

master
BuckarooBanzay 2020-03-05 07:23:15 +01:00
parent d540935821
commit a48eaccd5a
3 changed files with 16 additions and 6 deletions

View File

@ -13,4 +13,9 @@ jobs:
- uses: actions/checkout@v1
- name: mirror
run: ./mirror.sh https://git.bananach.space/advtrains.git git@github.com:minetest-mirrors/advtrains.git master
run: ./mirror.sh
env:
source_repo: https://git.bananach.space/advtrains.git
github_repo: advtrains.git
branch: master
access_token: ${{ secrets.ACCESS_TOKEN }}

View File

@ -1,4 +1,4 @@
name: advtrains
name: digistuff
on:
schedule:
@ -13,4 +13,9 @@ jobs:
- uses: actions/checkout@v1
- name: mirror
run: ./mirror.sh https://cheapiesystems.com/git/digistuff git@github.com:minetest-mirrors/digistuff.git master
run: ./mirror.sh
env:
source_repo: https://cheapiesystems.com/git/digistuff
github_repo: digistuff.git
branch: master
access_token: ${{ secrets.ACCESS_TOKEN }}

View File

@ -1,6 +1,6 @@
#!/bin/sh
git clone $1 gh_repo
git clone https://${access_token}@github.com/minetest-mirrors/${github_repo} gh_repo
cd gh_repo
git pull $2 $3
git push origin $3
git pull ${source_repo} ${branch}
git push origin ${branch}