ruby-koans/.gitea/workflows/validate-on-push.yml

27 lines
774 B
YAML
Raw Normal View History

2023-12-27 08:48:51 +00:00
name: Validate on Push
on: [push, pull_request]
jobs:
validate:
runs-on: ubuntu-latest
2023-12-27 09:37:16 +00:00
container:
image: ruby:3.1.4
2023-12-27 08:48:51 +00:00
outputs:
completion_pct: ${{ steps.run_koans.outputs.completion_pct }}
steps:
- uses: actions/checkout@v4
- id: run_koans
run: |
bundle exec rake | tee output.txt
echo "completion_pct=$(grep -E '\d+%' output.txt)" >> "$GITEA_OUTPUT"
- id: update_svg
if: ${{ gitea.event_name == 'push' }}
run: |
ruby scripts/update-progress.rb
git config --global user.name 'Autobot'
git config --global user.email 'autobot@git.sangeeth.dev'
git add README.md
git commit -m 'chore: update progress in README.md'
git push