mirror of
https://github.com/serverless/serverless.git
synced 2026-01-25 15:07:39 +00:00
Automate keeping the sfe-next branch upto date
This commit is contained in:
parent
113a1a1b4c
commit
f6dafb4e9a
25
.github/workflows/update-sfe-next.yml
vendored
Normal file
25
.github/workflows/update-sfe-next.yml
vendored
Normal file
@ -0,0 +1,25 @@
|
||||
on:
|
||||
push:
|
||||
# Sequence of patterns matched against refs/heads
|
||||
branches:
|
||||
- master
|
||||
name: Update the sfe-next branch on pushes to master
|
||||
jobs:
|
||||
updateSfeNextBranch:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
- name: Setup node
|
||||
uses: actions/setup-node@v1
|
||||
- name: update the dependency on @serverless/enterprise-plugin to the next tag
|
||||
run: node scripts/update-sfe-dep.js
|
||||
- name: git commit
|
||||
uses: srt32/git-actions@v0.0.3
|
||||
with:
|
||||
args: git config --global user.email "engineering@serverless.com" && git config --global user.name "Github Action" && git commit -am 'update the dependency on @serverless/enterprise-plugin to the next tag'
|
||||
- name: git push
|
||||
uses: srt32/git-actions@v0.0.3
|
||||
with:
|
||||
args: git push https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY} HEAD:sfe-next -f
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
7
scripts/update-sfe-dep.js
Normal file
7
scripts/update-sfe-dep.js
Normal file
@ -0,0 +1,7 @@
|
||||
const fs = require('fs');
|
||||
|
||||
const pkgJson = JSON.parse(fs.readFileSync('package.json'));
|
||||
|
||||
pkgJson.dependencies['@serverless/enterprise-plugin'] = 'next';
|
||||
|
||||
fs.writeFileSync('package.json', JSON.stringify(pkgJson, null, 2));
|
||||
Loading…
x
Reference in New Issue
Block a user