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 Mar 2, 2024
1 parent d6be8ef commit ea1ec84
Showing 1 changed file with 10 additions and 24 deletions.
34 changes: 10 additions & 24 deletions .github/workflows/merging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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".

0 comments on commit ea1ec84

Please sign in to comment.