-
Notifications
You must be signed in to change notification settings - Fork 4
42 lines (40 loc) · 1.14 KB
/
update-versions.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
name: Update preview
on:
workflow_run:
workflows: ["Release packages"]
types:
- completed
jobs:
update_preview:
runs-on: ubuntu-latest
permissions:
contents: "write"
pull-requests: "write"
steps:
- uses: actions/checkout@v2
with:
ref: "main"
fetch-depth: 0
- name: "Get latest tag"
id: latesttag
uses: "WyriHaximus/github-action-get-previous-tag@v1"
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.0.0
bundler-cache: true
- uses: actions/setup-node@v2
with:
node-version: "16.17.0"
env:
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
- run: npm install -g yarn
- name: Update preview app
run: |
git config --global user.email "[email protected]"
git config --global user.name "Github Action"
./scripts/update-versions.sh ${{ steps.latesttag.outputs.tag }}
shell: bash
- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
with:
branch: update-versions-to-${{ steps.latesttag.outputs.tag }}