This repository was archived by the owner on Mar 1, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 1
75 lines (61 loc) · 2.29 KB
/
split.yml
File metadata and controls
75 lines (61 loc) · 2.29 KB
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
name: "Sub-Split Components"
on:
push:
branches:
- master
tags:
- "**"
jobs:
narrowspark-subsplit:
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: true
max-parallel: 20
matrix:
operating-system: [ubuntu-latest]
dependencies: [
"src/Common:git@github.com:narrowspark/automatic-common.git",
"src/Prefetcher:git@github.com:narrowspark/automatic-composer-prefetcher.git",
"src/Security:git@github.com:narrowspark/automatic-security-audit.git"
]
name: "Split ${{ matrix.dependencies }}"
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 2
- name: "git-bash"
uses: fnkr/github-action-git-bash@v1.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_ACTOR: ${{ secrets.NARROWSPARK_USERNAME }}
- name: "Configure Container"
env:
NARROWSPARK_EMAIL: ${{ secrets.NARROWSPARK_EMAIL }}
NARROWSPARK_USERNAME: ${{ secrets.NARROWSPARK_USERNAME }}
run: |
echo "::set-env name=SOURCE_NAME::${GITHUB_REF#refs/*/}"
echo "::set-env name=SOURCE_BRANCH::${GITHUB_REF#refs/heads/}"
echo "::set-env name=SOURCE_TAG::${GITHUB_REF#refs/tags/}"
EMAIL=${NARROWSPARK_EMAIL:-"d.bannert@anolilab.de"}
NAME=${NARROWSPARK_USERNAME:-"prisis"}
git config --global user.email "${EMAIL}"
git config --global user.name "${NAME}"
- name: "Install Sub-Split"
run: |
wget https://github.com/dflydev/git-subsplit/archive/master.tar.gz && tar -zxvf master.tar.gz && rm -rf master.tar.gz
cd ./git-subsplit-master
sudo ./install.sh
cd ..
- name: "Setup SSH Keys and known_hosts"
uses: webfactory/ssh-agent@v0.1.1
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: "Init Sub-Split"
run: git subsplit init git@github.com:narrowspark/automatic.git
- name: "Splitting ${{ matrix.dependencies }}"
run: |
OPTION="--heads=master --no-tags";
if [[ ${SOURCE_TAG} != ${GITHUB_REF} ]]; then
OPTION="--tags=\"${SOURCE_TAG}\"";
fi;
git subsplit publish ${{ matrix.dependencies }} --update ${OPTION}