From 216e28a545875af232c605cbb181044039b0ff91 Mon Sep 17 00:00:00 2001 From: tabarra <1808295+tabarra@users.noreply.github.com> Date: Sun, 16 Jun 2024 06:48:30 -0300 Subject: [PATCH] ci: attempt to fix locale checking workflow --- .github/workflows/locale-pull-request.yml | 31 +++++++++++------------ 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/.github/workflows/locale-pull-request.yml b/.github/workflows/locale-pull-request.yml index efa7c280c..ef63c010f 100644 --- a/.github/workflows/locale-pull-request.yml +++ b/.github/workflows/locale-pull-request.yml @@ -10,24 +10,33 @@ jobs: runs-on: ubuntu-latest permissions: pull-requests: write + steps: - name: Checkout code uses: actions/checkout@v4 - - name: Use Node.js - uses: actions/setup-node@v3.8.1 + - name: Use Node.js 20 + uses: actions/setup-node@v4 with: - node-version: '20' + node-version: 20 - name: Install dependencies run: npm ci - name: Label PR and enforce base branch - uses: actions/github-script@v6.4.1 + uses: actions/github-script@v7 with: script: | - console.warn('This is bugged and doesn\'t work, skip this step for now!'); - process.exit(0); + // console.warn('This is bugged and doesn\'t work, skip this step for now!'); + // process.exit(0); + + // Add the 'translation' label + github.rest.issues.addLabels({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + labels: ['translation'] + }); console.log(JSON.stringify(context.payload.pull_request)); const { repo, owner } = context.repo; @@ -40,14 +49,6 @@ jobs: pull_number }); - // Add the 'translation' label - github.rest.issues.addLabels({ - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo, - labels: ['translation'] - }) - // Check if the base branch is 'main' or 'master' if (pull_request.data.base.ref === 'main' || pull_request.data.base.ref === 'master') { // Change the base branch to 'develop' @@ -58,8 +59,6 @@ jobs: base: 'develop' }); } - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Run locale:check id: locale-check