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
Browse files Browse the repository at this point in the history
  • Loading branch information
WiolaWysopal authored Feb 22, 2024
1 parent 83a0424 commit a075aa9
Showing 1 changed file with 10 additions and 25 deletions.
35 changes: 10 additions & 25 deletions .github/workflows/merging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,16 @@ 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: 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."

0 comments on commit a075aa9

Please sign in to comment.