create-issue #7
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: create-issue | |
on: | |
workflow_dispatch: | |
jobs: | |
create_issue: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Get 2 days ago date | |
id: date | |
run: | | |
echo "::set-output name=twodaysago::$(date --date="2 day ago" +"%Y-%m-%d")" | |
- name: Create an issue | |
run: | | |
issueID='gh issue create --title $ISSUE_TITLE --body $ISSUE_BODY' | |
echo 'ISSUE_ID='$issueID >> $GITHUB_ENV | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
ISSUE_TITLE: 'EPA Submissions for ${{ steps.date.outputs.twodaysago }}' | |
ISSUE_BODY: 'If any submissions, they will be here: https://github.com/EPA-Ireland-Updates-Unofficial/epa-rss/blob/main/output/csv/daily/${{ steps.date.outputs.twodaysago }}.csv' | |
- name: Close that issue | |
run: | | |
issueID='gh issue close $ISSUE_ID' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |