generated from actions/typescript-action
-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
36 lines (32 loc) · 1.08 KB
/
action.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
33
34
35
36
name: 'Ninja i18n'
description: 'Automatic i18n checks, issue reports and correction workflow for your pull requests'
author: 'opral'
branding:
icon: 'globe'
color: 'gray-dark'
runs:
using: composite
steps:
- name: Checkout target
uses: actions/checkout@v4
with:
token: ${{ env.GITHUB_TOKEN }}
path: target
- name: Get merge commit sha from PR
id: get-merge-sha
shell: bash
run: |
merge_commit_sha=$(curl -s -H "Authorization: token ${{ env.GITHUB_TOKEN }}" \
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }} \
| jq -r '.merge_commit_sha')
echo "merge_commit_sha=${merge_commit_sha}" >> $GITHUB_OUTPUT
- name: Checkout merge
uses: actions/checkout@v4
with:
ref: ${{ steps.get-merge-sha.outputs.merge_commit_sha }}
token: ${{ env.GITHUB_TOKEN }}
path: merge
- name: Run Ninja linting
shell: bash
run: node ${{ github.action_path }}/dist/index.cjs