Skip to content

Schedule Monthly

Schedule Monthly #21

name: Schedule Monthly
# This action runs at 11:00 UTC/ 3:00 PDT on the first day of every month except January.
on:
schedule:
- cron: 0 11 1 2-12 *
workflow_dispatch:
jobs:
Trim_Contributors:
runs-on: ubuntu-latest
if: github.repository == 'hackforla/website'
steps:
# Checkout repo
- name: Checkout repository
uses: actions/checkout@v4
# Checks member activity logs for recent and previous contributors
- name: Get Contributors
id: get-contributors
uses: actions/github-script@v7
with:
github-token: ${{ secrets.HACKFORLA_ADMIN_TOKEN }}
script: |
const script = require('./github-actions/trigger-schedule/list-inactive-members/get-contributors-data.js')
const results = script({ g: github, c: context })
return results
# Trims inactive members from team and notifies idle members
- name: Trim and Notify Members
id: trim-and-notify-members
uses: actions/github-script@v7
with:
github-token: ${{ secrets.HACKFORLA_ADMIN_TOKEN }}
script: |
const results = ${{ steps.get-contributors.outputs.result }}
const script = require('./github-actions/trigger-schedule/list-inactive-members/trim-inactive-members.js')
script({ g: github, c: context }, results)
# Commits list of inactive members to repo for using in next step, and in one month
- name: Update Inactive Members JSON
id: update-inactive-members-json
uses: stefanzweifel/[email protected]
with:
# Glob pattern of file which should be added to the commit
file_pattern: github-actions/utils/_data/inactive-members.json
# Optional commit message and author settings
commit_message: Update Inactive Members JSON
commit_author: GitHub Actions Bot <[email protected]>