Skip to content

Update snake.yml

Update snake.yml #22

Workflow file for this run

name: Generate snake animation
on:
schedule: # execute every 12 hours
- cron: "0 */12 * * *"
workflow_dispatch:
push:
branches:
- master
jobs:
generate:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Generate snake.svg
run: |
# Fetch contributions data using GitHub API
curl -sSL -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
"https://api.github.com/orgs/sankacrew/stats/contributors" \
-o contributors.json
# Parse JSON data to extract contributions
# Example: Extract contribution counts for each member
# (Replace this with your preferred method)
cat contributors.json | # Parse JSON data to extract contributions
jq '.[] | {login: .author.login, contributions: .total}' contributors.json > contributions.txt

Check failure on line 31 in .github/workflows/snake.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/snake.yml

Invalid workflow file

You have an error in your yaml syntax on line 31
# Use contributions data to generate snake.svg (modify as needed)
# Example: Use contributions to generate a custom snake animation
python generate_snake.py contributions.txt > dist/snake.svg
- name: Push snake.svg to output branch
uses: actions/upload-artifact@v2
with:
name: snake-svg
path: dist/snake.svg