-
Notifications
You must be signed in to change notification settings - Fork 117
42 lines (34 loc) · 1.25 KB
/
test-github-lint-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
37
38
39
40
41
42
name: Ninja i18n action
on:
pull_request_target:
# explicitly configure permissions, in case your GITHUB_TOKEN workflow permissions are set to read-only in repository settings
permissions:
pull-requests: write
jobs:
ninja-i18n:
name: Ninja i18n - GitHub Lint Action
runs-on: ubuntu-latest
steps:
- name: Checkout target
id: checkout
uses: actions/checkout@v4
with:
path: target
- name: Get merge commit sha from PR
run: |
merge_commit_sha=$(curl -s -H "Authorization: token ${{ secrets.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
id: get-merge-sha
- name: Checkout merge
uses: actions/checkout@v4
with:
ref: ${{ steps.get-merge-sha.outputs.merge_commit_sha }}
path: merge
- name: Run Ninja i18n
id: ninja-i18n
uses: ./target/inlang/source-code/github-lint-action/internal-testing
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}