Skip to content

fix(cicd): Fixed bad syntax on github actions flows #307

fix(cicd): Fixed bad syntax on github actions flows

fix(cicd): Fixed bad syntax on github actions flows #307

# If you change the commit message you need to change .bin/get-and-patch-readme-repository-details.py
name: Readme updater - Updates readme with latest stats
on:
push:
workflow_dispatch:
jobs:
update-readme:
if: ${{ vars.RUN_UPDATERS }} == '1'

Check warning on line 12 in .github/workflows/readme-updater.yml

View workflow run for this annotation

GitHub Actions / Readme updater - Updates readme with latest stats

Workflow syntax warning

.github/workflows/readme-updater.yml (Line: 12, Col: 9): Conditional expression contains literal text outside replacement tokens. This will cause the expression to always evaluate to truthy. Did you mean to put the entire expression inside ${{ }}?
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Clone repository
uses: actions/checkout@v3
- name: Update readme
run: .bin/get-and-patch-readme-repository-details.py
- name: Commit files if changed
run: |
git add -N .
if [ -z "$(git ls-files --modified)" ]; then
echo "[+] No files were changed"
else
echo "[+] Files were changed! Pushing changed..."
git add -A
git remote set-url origin "https://x-access-token:${GITHUB_TOKEN}@github.com/$GITHUB_REPOSITORY"
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git commit -m "[Github Action] Automated readme update."
git push
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}