Add Issues to IPDX project #1432
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: Add Issues to IPDX project | |
on: | |
workflow_dispatch: | |
inputs: | |
dry-run: | |
description: Wether to perform a dry run | |
required: false | |
default: 'true' | |
query: | |
description: Query modifier to use when looking for issues | |
required: false | |
default: '' | |
schedule: | |
# “At minute 35 past every 12th hour.” - https://crontab.guru/#35_*/12_*_*_* | |
- cron: '35 */12 * * *' | |
jobs: | |
add: | |
name: Add Issues to IPDX project | |
runs-on: ubuntu-latest | |
env: | |
GITHUB_TOKEN: ${{ secrets.GALARGH_GITHUB_TOKEN }} | |
steps: | |
- id: date | |
run: | | |
echo "::set-output name=today::$(date +'%Y-%m-%d')" | |
echo "::set-output name=yesterday::$(date -d 'yesterday' +'%Y-%m-%d')" | |
- uses: actions/checkout@v3 | |
- run: npm install && npm run build | |
working-directory: scripts | |
- run: | | |
node lib/actions/add-issues-to-ipdx-project.js \ | |
--dryRun "${{ github.event.inputs.dry-run || 'false' }}" \ | |
--query "${{ github.event.inputs.query || format('created:>={0}', steps.date.outputs.yesterday) }}" | |
working-directory: scripts |