Skip to content

Add support for github actions #32

Add support for github actions

Add support for github actions #32

Workflow file for this run

name: Feat Branch Deploy
on:
push:
branches:
- feat/*
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: sudo apt-get update
- run: sudo apt-get install -y libkrb5-dev
- name: Use Node.js 20.x
uses: actions/setup-node@v3
with:
node-version: 20
cache: npm
- name: Install node_modules
run: npm install
- name: Lint
run: npm run lint
- name: Test
run: npm run test
build:
needs: test
runs-on: ubuntu-latest
env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
GH_TOKEN: ${{ github.token }}
BODY: ${{ github.event.head_commit.message }}
steps:
- uses: actions/checkout@v4
- name: Create pull request
run: |
gh_pr_up() {
gh pr create --draft $* --body "${BODY}" || gh pr edit $* --body "${BODY}"
}
gh_pr_up --base master --title "${BRANCH_NAME}"