From 8d0474d8c65eeeab6a67516d02810082b8e28f49 Mon Sep 17 00:00:00 2001 From: wwysopal Date: Sat, 2 Mar 2024 12:41:14 +0100 Subject: [PATCH] Update merging.yml file --- .github/workflows/merging.yml | 33 +++++++++++---------------------- 1 file changed, 11 insertions(+), 22 deletions(-) diff --git a/.github/workflows/merging.yml b/.github/workflows/merging.yml index c7bd698..c10d004 100644 --- a/.github/workflows/merging.yml +++ b/.github/workflows/merging.yml @@ -2,31 +2,20 @@ name: Action for merging on: pull_request: - branches: [ main ] + types: [closed] + branches: [main] jobs: - test: - strategy: - matrix: - node-version: [16.x, 18.x] - os: [ubuntu-latest, windows-latest, macos-latest] - runs-on: ${{ matrix.os }} - + notify-merge: + runs-on: ubuntu-latest + if: github.event.pull_request.merged == true steps: - - uses: actions/checkout@v3 + - name: Get the name of the merged branch + id: branch-name + run: echo "::set-output name=branch::${{ github.head_ref }}" - - name: Cache node modules - uses: actions/cache@v2 - with: - path: ~/.npm - key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-node- + - name: Print merge message + run: echo "Branch ${{ steps.branch-name.outputs.branch }} was merged with main branch." - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node-version }} - - run: npm ci - - run: npm run test + \ No newline at end of file