forked from mixOmicsTeam/mixOmics
-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (43 loc) · 1.3 KB
/
push2bioc.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
on: workflow_dispatch
name: "Push to Bioconductor"
jobs:
push:
runs-on: ubuntu-latest
steps:
- name: Check out repo ⬇️
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Push to Bioconductor
run: |
wd=$PWD
#--- log setup: log everything in log/log.out
mkdir -p log
exec 1>log/log.out 2>&1
set -ex
#--- ssh setup
mkdir ~/.ssh
cp .github/config ~/.ssh/config
cd ~/.ssh
ssh-agent /bin/sh
eval `ssh-agent -s`
ssh-add - <<< "$SSH_KEY"
ssh-keyscan $BIOC_HOST > ~/.ssh/known_hosts
cd $wd
#--- git config
git config user.name 'Al J Abadi'
git config user.email '[email protected]'
git remote add bioc [email protected]:packages/mixOmics.git
#--- push
git fetch --all # for logs in case of failure
current_branch=${{ github.ref_name }}
git push bioc $current_branch:$current_branch
env:
SSH_KEY: ${{ secrets.PRIVATE_SSH_KEY_AL }}
BIOC_HOST: ${{ secrets.BIOC_HOST }}
- name: Upload Logs
if: always()
uses: actions/upload-artifact@master
with:
name: log
path: log