Skip to content

Test-target-update #1242

Test-target-update

Test-target-update #1242

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:
test-action:
name: GitHub Actions Test
runs-on: ubuntu-latest
steps:
- name: Checkout target branch
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: Setup Pnpm
uses: pnpm/action-setup@v2
with:
version: 8
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install Dependencies in target
run: pnpm install
working-directory: target
- name: Build in target
run: pnpm --filter @inlang/github-lint-action... build
working-directory: target
- name: Test Local Action
id: test-action
uses: ./target/inlang/source-code/github-lint-action
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}