From ea1ec84f2f559c4628c03c95988ad8e3a37f88bd Mon Sep 17 00:00:00 2001 From: Wiola Wysopal <115031260+WiolaWysopal@users.noreply.github.com> Date: Sat, 2 Mar 2024 12:35:03 +0100 Subject: [PATCH] Update merging.yml --- .github/workflows/merging.yml | 34 ++++++++++------------------------ 1 file changed, 10 insertions(+), 24 deletions(-) diff --git a/.github/workflows/merging.yml b/.github/workflows/merging.yml index c7bd698..3cd7293 100644 --- a/.github/workflows/merging.yml +++ b/.github/workflows/merging.yml @@ -2,31 +2,17 @@ name: Action for merging on: pull_request: + 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: Cache node modules - uses: actions/cache@v2 - with: - path: ~/.npm - key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-node- - - - 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 + - name: Get the name of the merged branch + id: branch-name + run: echo "::set-output name=branch::${{ github.head_ref }}" + - name: Print merge message + run: echo "Branch ${{ steps.branch-name.outputs.branch }} was merged with main branch". +