From 4b56b92e6fc7a0e5445552b4dd14ad9b15b58954 Mon Sep 17 00:00:00 2001 From: Ando <65276708+andostronaut@users.noreply.github.com> Date: Fri, 12 Jul 2024 17:52:38 +0300 Subject: [PATCH] feat: create gh workflow for build and auto create pr --- .github/workflows/build.yaml | 31 +++++++++++++++++++++++++++++++ .github/workflows/request.yaml | 17 +++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 .github/workflows/build.yaml create mode 100644 .github/workflows/request.yaml diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 0000000..1c8e948 --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,31 @@ +name: build + +on: [push, pull_request] + +jobs: + build: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + node-version: + - 20.13.1 + bun-version: + - 1.1.12 + + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + - uses: oven-sh/setup-bun@v1 + with: + bun-version: ${{ matrix.bun-version }} + - uses: actions/cache@v3 + with: + path: | + .next/cache + key: ${{ runner.os }}-nextjs-${{ hashFiles('**/bun.lockb') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }} + restore-keys: | + ${{ runner.os }}-nextjs-${{ hashFiles('**/bun.lockb') }}- + - run: bun install diff --git a/.github/workflows/request.yaml b/.github/workflows/request.yaml new file mode 100644 index 0000000..27b3272 --- /dev/null +++ b/.github/workflows/request.yaml @@ -0,0 +1,17 @@ +name: pull-request + +on: + push: + branches-ignore: + - main + +jobs: + create-pull-request: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: jascodes/pr-branch-action@1.0.3 + env: + GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} + PULL_REQUEST_BRANCH: main + PULL_REQUEST_TITLE: ${{ github.event.commits[0].message }}