Skip to content
This repository has been archived by the owner on Jul 8, 2024. It is now read-only.

Commit

Permalink
Update merging.yml file
Browse files Browse the repository at this point in the history
  • Loading branch information
WiolaWysopal committed Mar 2, 2024
1 parent fd6d496 commit 8d0474d
Showing 1 changed file with 11 additions and 22 deletions.
33 changes: 11 additions & 22 deletions .github/workflows/merging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 8d0474d

Please sign in to comment.