DEV Community

Cover image for Class Attendee Action
Ishan Sharma
Ishan Sharma

Posted on

Class Attendee Action

My Workflow

I have made a GitHub Action named 'Class Attendee' for helping me to get over those boring 'OOPS' classes hosted by my university on Google Meet.

With ease:

  • Set a scheduled time for your classes.
  • Manage your time and learn concepts at your own pace
  • Make sure that you're never short on your college attendance.

P.S. OOPS or any other university course is an important part of the curriculum and you should never skip it. My only intention with this action is to be able to understand and grasp these concepts by actually implementing them on my own, a practice which I'm not able to follow while attending my University Classes.

Submission Category:

Wacky Wildcards

SECRETS

Make sure to add 3 secrets in your project, by going to

Project Settings > Secrets > New Secret.

The Format for these 3 secrets is as below :

  • USER_EMAIL : Contains Your Google Account Email Address

  • USER_PASSWORD : Contains Your Google Account Password

  • MEET_LINK : The Link for the Google Meet you'd like to join.

Yaml File or Link to Code

Example Workflow file

An example workflow to set up your class attender action quickly.

name: Class Attender

on:
  # Set the time here
  schedule:
    - cron: "0 11 * * *" # 11 AM Every Morning

jobs:
  build:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version: [3.7]

    steps:
      - uses: actions/checkout@v2
      - name: Set up Python ${{ matrix.python-version }}
        uses: actions/setup-python@v2
        with:
          python-version: ${{ matrix.python-version }}

      - name: Setup Chromedriver
        uses: nanasess/setup-chromedriver@master
      - run: |
          export DISPLAY=:99
          chromedriver --url-base=/wd/hub &
          sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 &

      - name: Install dependencies
        run: |
          python -m pip install --upgrade pip
          pip install selenium pyvirtualdisplay pause

      - name: RUN
        run: |
          python ./script.py ${{ secrets.USER_EMAIL }} ${{ secrets.USER_PASSWORD }} ${{ secrets.MEET_LINK }}

Enter fullscreen mode Exit fullscreen mode

GitHub logo ishandeveloper / Class-Attendee-Action

This repository is dedicated to a GitHub Action for running a cron job, every morning at 11 AM to attend my super boring OOPS Classes.


Class Attendee Action


This repository is dedicated to a GitHub Action for running a cron job, every morning at 11 AM to attend my super boring OOPS Classes.

THIS REPOSITORY WAS CREATED AS A PART OF ACTIONS HACKATHON HOSTED BY DEV.TO AND GITHUB, VIEW THE SUBMISSION HERE

SECRETS

Make sure to add 3 secrets in your project, by going to

Project Settings > Secrets > New Secret.

The Format for these 3 secrets is as below :

    # Contains Your Google Account Email Address
    USER_EMAIL
    # Contains Your Google Account Password
    USER_PASSWORD
    # Add the Link for the Google Meet you'd like to join.
    MEET_LINK      
  

Usage

Example Workflow file

An example workflow to set up your class attender action quickly.

name: Class Attender
on:
  # Set the time here
  schedule:
    - cron: "0 11 * * *" # 11 AM Every Morning

jobs:
  
Enter fullscreen mode Exit fullscreen mode

Additional Resources / Info

This action uses following open-source actions under the hood to set up things easily.

GitHub logo nanasess / setup-chromedriver

ChromeDriver for use in GitHub Actions

setup-chromedriver

GitHub Actions status LICENSE

This action sets up a ChromeDriver for use in actions

OS/Platform support

  • ubuntu-latest, ubuntu-20.04 or ubuntu-18.04
  • macos-latest, macos-10.15
  • windows-latest, windows-2019

Usage

See action.yml

for ubuntu-latest, macos-latest

steps:
- uses: actions/checkout@v2
- uses: nanasess/setup-chromedriver@v1
  with:
    # Optional: do not specify to match Chrome's version
    chromedriver-version: '88.0.4324.96'
- run: |
    export DISPLAY=:99
    chromedriver --url-base=/wd/hub &
    sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 & # optional
Enter fullscreen mode Exit fullscreen mode

for windows-latest

steps:
- uses: actions/checkout@v2
- uses: nanasess/setup-chromedriver@v1
  with:
    # Optional: do not specify to match Chrome's version
    chromedriver-version: '88.0.4324.96'
- run: chromedriver --url-base=/wd/hub &
Enter fullscreen mode Exit fullscreen mode

Made with ♥ by ishandeveloper

Top comments (1)

Collapse
 
m3_ph3 profile image
PH3N0M3N0L

LMAO! This is next level crazy 😂😂