Skip to content

Latest commit

 

History

History
51 lines (45 loc) · 1.55 KB

README.md

File metadata and controls

51 lines (45 loc) · 1.55 KB

Dev locally

Steps

  1. Click fork 00-Click-fork
  2. Create fork repo 01-Create-fork
  3. Enable Action 02-Enable-action
  4. Setup secretes 03-1-Setup-secrets 03-2-Create-secret 03-3-Create-secret

Use as Action

Steps

  1. set your repo secret
    • ACCOUNT
    • PASSWORD
  2. Add action like below, put in .github/workflows/punch.yaml .
name: Punch in

on:
  schedule:
    - cron: '0 0 * * 1-5'
    - cron: '0 11 * * 1-5'

jobs:
  attendence:
    name: do_punch
    runs-on: ubuntu-latest
    env:
      ACCOUNT: ${{ secrets.ACCOUNT}}
      PASSWORD: ${{ secrets.PASSWORD}}
    steps:
      - name: Checkout
        uses: actions/checkout@v3
      - name: Punch in
        if: github.event.schedule == '0 0 * * 1-5'
        uses: ninochang/punchin@v1
        with:
          mode: in
      - name: Punch out
        if: github.event.schedule == '0 11 * * 1-5'
        uses: ninochang/punchin@v1
        with:
          mode: out