-
Notifications
You must be signed in to change notification settings - Fork 92
39 lines (37 loc) · 1.48 KB
/
buildbuddy-foss.yaml
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
name: BuildBuddy FOSS
on:
push:
branches:
- master
- main
jobs:
repo-sync:
name: Sync buildbuddy-foss with buildbuddy
runs-on: ubuntu-latest
steps:
- name: Sync repositories 1 to 1
uses: ungless/git-sync@master
with:
source_repo: "https://${{ secrets.BUILDBUDDY_GITHUB_USER_TOKEN }}@github.com/buildbuddy-io/buildbuddy.git"
source_branch: "master"
destination_repo: "https://${{ secrets.BUILDBUDDY_GITHUB_USER_TOKEN }}@github.com/buildbuddy-io/buildbuddy-foss.git"
destination_branch: "master"
- name: Checkout buildbuddy-foss
uses: actions/checkout@v3
with:
repository: "buildbuddy-io/buildbuddy-foss"
ref: master
token: ${{ secrets.BUILDBUDDY_GITHUB_USER_TOKEN }}
- name: Change LICENSE to pure MIT
run: |
sed -i -e '/Iteration, Inc\./,/Permission is hereby granted/c\Copyright (c) 2020-present Iteration, Inc.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy' LICENSE
echo -e "MIT License\n\n$(cat LICENSE)" > LICENSE
- name: Commit "Sync and remove all non-FOSS parts"
uses: EndBug/add-and-commit@v7
with:
author_name: BuildBuddy Bot
author_email: [email protected]
message: "Sync and remove all non-FOSS parts"
remove: '["-r enterprise/", "-r .github/"]'
env:
GITHUB_TOKEN: ${{ secrets.BUILDBUDDY_GITHUB_USER_TOKEN }}