generated from actions/typescript-action
-
-
Notifications
You must be signed in to change notification settings - Fork 5
32 lines (25 loc) · 856 Bytes
/
pr_main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
name: PR to main
on:
pull_request:
branches:
- main
jobs:
pr_main:
name: PR to main
runs-on: ubuntu-latest
if: ${{ github.event.sender.login != 'dependabot[bot]' }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.base.sha }}
- run: node -p "'version=' + require('./package.json').version" >> $GITHUB_OUTPUT
id: base-version
- uses: actions/checkout@v4
- run: node -p "'version=' + require('./package.json').version" >> $GITHUB_OUTPUT
id: new-version
- uses: madhead/semver-utils@latest
id: comparison
with:
version: ${{ steps.new-version.outputs.version }}
compare-to: ${{ steps.base-version.outputs.version }}
- run: '[[ ">" == "${{ steps.comparison.outputs.comparison-result }}" ]]'