forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 17
31 lines (28 loc) · 1.24 KB
/
main.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
name: Update nm-web-shared
on: [repository_dispatch]
jobs:
update_package:
runs-on: ubuntu-latest
if: github.event.client_payload.branch && github.event.client_payload.version
steps:
- uses: actions/checkout@v1
with:
ref: ${{ github.event.client_payload.branch }}
- uses: actions/setup-node@v1
with:
node-version: 10.15.2
- name: Install new version
env:
CYPRESS_INSTALL_BINARY: 0
run: |
npm config set registry ${{ secrets.NPM_REGISTRY }} &&
npm config set _auth ${{ secrets.NPM_TOKEN }} &&
npm config set always-auth true &&
yarn add ${{ github.event.client_payload.version }}
- name: Push changes
run: |
git config user.email '<>' &&
git config user.name "${{ secrets.NM_GITHUB_USER }}" &&
git remote set-url origin "https://${{ secrets.NM_GITHUB_USER }}:${{ secrets.NM_GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY.git" &&
git commit -am "Upgrading to version ${{ github.event.client_payload.version }}" &&
git push --set-upstream origin ${{ github.event.client_payload.branch }}