mirror of
https://github.com/cinnyapp/cinny.git
synced 2025-11-11 17:50:29 +03:00
Update and simplify actions (#831)
* Replace action with one we use already * Simplify PR actions * fix name
This commit is contained in:
parent
b8a8babc88
commit
831bb83f4e
4 changed files with 75 additions and 102 deletions
24
.github/workflows/build-pull-request.yml
vendored
24
.github/workflows/build-pull-request.yml
vendored
|
|
@ -6,6 +6,7 @@ on:
|
|||
|
||||
jobs:
|
||||
build-pull-request:
|
||||
name: 'Build pull request'
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
PR_NUMBER: ${{github.event.number}}
|
||||
|
|
@ -16,23 +17,22 @@ jobs:
|
|||
uses: actions/setup-node@v3.4.1
|
||||
with:
|
||||
node-version: 17.9.0
|
||||
cache: 'npm'
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
- name: Build app
|
||||
run: npm ci && npm run build
|
||||
run: npm run build
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v3.1.0
|
||||
with:
|
||||
name: previewbuild
|
||||
name: preview
|
||||
path: dist
|
||||
retention-days: 1
|
||||
- name: Get PR info
|
||||
uses: actions/github-script@v6.2.0
|
||||
with:
|
||||
script: |
|
||||
var fs = require('fs');
|
||||
fs.writeFileSync('${{github.workspace}}/pr.json', JSON.stringify(context.payload.pull_request));
|
||||
- name: Upload PR Info
|
||||
- name: Save pr number
|
||||
run: echo ${PR_NUMBER} > ./pr.txt
|
||||
- name: Upload pr number
|
||||
uses: actions/upload-artifact@v3.1.0
|
||||
with:
|
||||
name: pr.json
|
||||
path: pr.json
|
||||
retention-days: 1
|
||||
name: pr
|
||||
path: ./pr.txt
|
||||
retention-days: 1
|
||||
Loading…
Add table
Add a link
Reference in a new issue