Skip to content

create-issue

create-issue #7

Workflow file for this run

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 }}