Update spa.po #223
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Mistake Checker | |
on: | |
pull_request_target: | |
branches: [ master ] | |
paths: | |
- "translations/**" | |
jobs: | |
getfiles: | |
name: Check changed files for mistakes | |
runs-on: ubuntu-latest | |
permissions: | |
pull-requests: write | |
issues: write | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: Check changed files for mistakes | |
id: mistakes | |
shell: bash | |
run: | | |
echo $(python ${{ github.workspace }}/.github/workflows/mistake_check.py ${{ github.event.pull_request.number }}) > mistakes.txt | |
echo ${{ github.event.pull_request.number }} > number.txt | |
- name: Upload a Build Artifact | |
uses: actions/[email protected] | |
with: | |
name: mistakes | |
path: | | |
mistakes.txt | |
number.txt | |
- name: Output detected mistakes if any | |
uses: actions/github-script@v6 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
script: | | |
let fs = require('fs'); | |
const mistakes = JSON.parse(fs.readFileSync('./mistakes.txt').toString()); | |
if (mistakes.length !== 0) | |
if (mistakes.map(mistake => mistake.condition).includes("invalid_format")) | |
core.setFailed("Mistakes found! Check comment for more details"); |