Skip to content

Commit

Permalink
ci: attempt to fix locale checking workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
tabarra committed Jun 16, 2024
1 parent 97b89bd commit 216e28a
Showing 1 changed file with 15 additions and 16 deletions.
31 changes: 15 additions & 16 deletions .github/workflows/locale-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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'
Expand All @@ -58,8 +59,6 @@ jobs:
base: 'develop'
});
}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Run locale:check
id: locale-check
Expand Down

0 comments on commit 216e28a

Please sign in to comment.