Auto Close Outdated Issues #22
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: Auto Close Outdated Issues | |
on: | |
schedule: | |
- cron: '0 0 1 * *' | |
workflow_dispatch: | |
# inputs: | |
# name: | |
# description: 'Person to greet' | |
# required: true | |
# default: 'Mona the Octocat' | |
# home: | |
# description: 'location' | |
# required: false | |
# default: 'The Octoverse' | |
jobs: | |
auto-close: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set long time ago date as env variable | |
run: echo "::set-env name=LONG_TIME::$(date -d "365 days ago" +"%Y-%m-%d")" | |
- name: Set query as env variable | |
run: echo "::set-env name=QUERY::created:<$LONG_TIME state:open" | |
- uses: lee-dohm/close-matching-issues@v2 | |
with: | |
query: ${{ env.QUERY }} | |
token: ${{ secrets.GITHUB_TOKEN }} | |