Schedule Monthly #82
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Schedule Monthly | |
# This action runs at 11:00 UTC/ 3:00 PDT on the first day of the month. | |
on: | |
schedule: | |
- cron: 0 11 1 * * | |
workflow_dispatch: | |
jobs: | |
Trim_Contributors: | |
runs-on: ubuntu-latest | |
if: github.repository == 't-will-gillis/website' | |
steps: | |
# Checkout repo | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.TEST_GHAS }} | |
# Setup node | |
- name: Setup node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
cache: 'npm' | |
# Install dependencies to run js file | |
- name: Install npm dependencies | |
run: npm install | |
working-directory: ./github-actions/trigger-schedule/github-data | |
# Run js file- check action logs for inactive members and removes from 'website-write' | |
- name: Trim members | |
env: | |
token: ${{ secrets.TEST_GHAS }} | |
run: node github-actions/trigger-schedule/github-data/contributors-data.js | |
# Create_New_Issue: | |
# needs: Trim_Contributors | |
# runs-on: ubuntu-latest | |
# steps: | |
# - uses: actions/checkout@v4 | |
# Creates a new issue in 'hackforla/website' repo with the list populated above. creates a project card linking to this issue | |
- name: Create new issue | |
uses: actions/github-script@v6 | |
id: create-new-issue | |
with: | |
github-token: ${{ secrets.TEST_GHAS }} | |
script: | | |
const script = require('./github-actions/trigger-schedule/list-inactive-members/create-new-issue.js'); | |
const createNewIssue = script({g: github, c: context}); | |
return createNewIssue; | |
# Comments on issue #2607, notifying leads that the above issue has been created | |
- name: Comment issue | |
uses: actions/github-script@v6 | |
id: comment-issue | |
with: | |
github-token: ${{ secrets.TEST_GHAS }} | |
script: | | |
const script = require('./github-actions/trigger-schedule/list-inactive-members/comment-issue.js'); | |
const newIssueNumber = ${{ steps.create-new-issue.outputs.result }}; | |
script({g: github, c: context}, newIssueNumber); |