-
Notifications
You must be signed in to change notification settings - Fork 30
54 lines (45 loc) · 1.62 KB
/
create-app.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
48
49
50
51
52
53
54
name: Create Sismo Connect App
on:
issue_comment:
types: [created]
jobs:
create-app:
runs-on: ubuntu-latest
if: contains(github.event.comment.body, '/create-app')
steps:
- name: Check if sismo-core organisation member
id: is_organization_member
uses: jamessingleton/[email protected]
with:
organization: "sismo-core"
username: ${{ github.actor }}
token: ${{ secrets.GITHUB_TOKEN }}
- if: steps.is_organization_member.outputs.result != 'true'
run: exit 1
- name: Checkout code
uses: actions/checkout@v3
with:
token: ${{secrets.SISMOBOT_TOKEN}}
- name: Checkout Pull Request
run: hub pr checkout ${{ github.event.issue.number }}
env:
GITHUB_TOKEN: ${{ secrets.SISMOBOT_TOKEN }}
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Create Sismo Connect App on the factory
run: yarn sync-all-apps-factory
env:
SISMO_FACTORY_URL: https://factory-api.sismo.io
SISMO_FACTORY_TOKEN: ${{ secrets.SISMO_FACTORY_TOKEN }}
- name: Set up SSH
run: |
mkdir -p ~/.ssh
echo "${{ secrets.SISMOBOT_SSH }}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh-keyscan github.com >> ~/.ssh/known_hosts
- name: Commit and push filled appId
run: |
git config --global user.email "[email protected]"
git config --global user.name "sismobot"
git commit -a -m "feat: create Sismo Connect App and auto-fill appId" || exit 0
git push