From 38ef7f33c831d7fcd5a60596324400b1ee3dba15 Mon Sep 17 00:00:00 2001 From: Adnan Muttaqin Date: Mon, 24 Jun 2024 16:20:37 +0700 Subject: [PATCH] fix: github workflows --- .github/workflows/auto-pr-to-staging.yml | 26 +++++++++++++++++++++ .github/workflows/ci-feature-to-staging.yml | 11 ++++----- 2 files changed, 30 insertions(+), 7 deletions(-) create mode 100644 .github/workflows/auto-pr-to-staging.yml diff --git a/.github/workflows/auto-pr-to-staging.yml b/.github/workflows/auto-pr-to-staging.yml new file mode 100644 index 0000000..c8a2f19 --- /dev/null +++ b/.github/workflows/auto-pr-to-staging.yml @@ -0,0 +1,26 @@ +name: Auto PR from Feature to Staging + +on: + push: + branches: + - feature + +jobs: + create-pull-request: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Create Pull Request + uses: peter-evans/create-pull-request@v5 + with: + token: ${{ secrets.GITHUB_TOKEN }} + commit-message: 'Automatic PR: Update from Feature' + branch: staging + title: 'Automatic PR: Update from Feature' + body: | + This pull request was created automatically from feature branch to staging. + labels: automatic-pr + reviewers: '' diff --git a/.github/workflows/ci-feature-to-staging.yml b/.github/workflows/ci-feature-to-staging.yml index f739d27..da9922a 100644 --- a/.github/workflows/ci-feature-to-staging.yml +++ b/.github/workflows/ci-feature-to-staging.yml @@ -11,21 +11,18 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Set up Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: '14' - name: Install dependencies - run: npm install - - - name: Run lint - run: npm run lint + run: npm run install - name: Run build run: npm run build - name: Run start - run: npm start start + run: npm run start