Skip to content

.github/workflows/udemy.yml #19

.github/workflows/udemy.yml

.github/workflows/udemy.yml #19

Workflow file for this run

on:
workflow_dispatch:
schedule:
- cron: '0 0 1 * *'
jobs:
generate_badge:
runs-on: ubuntu-latest
name: badge_generation
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Badge generation
uses: Clement-Jean/udemy-badge-generator@v1
env:
UDEMY_TOKEN: ${{ secrets.UDEMY_TOKEN }}
UDEMY_COURSE: ${{ secrets.UDEMY_COURSE }}
- name: Commit the badge (if it changed)
run: |
if [[ `git status --porcelain` ]]; then
git config --global user.name 'Clement Jean'
git config --global user.email 'Clement-Jean@users.noreply.github.com'
git add .github/badges/udemy.svg
git commit -m "Autogenerated Udemy rating badge"
git push
fi