Skip to content

Commit

Permalink
Add new or update workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Gellipapa committed Jul 26, 2023
1 parent 91bf425 commit 81933ec
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ on:
issues:
types:
- opened
pull_request:
types:
pull_request_target:
types:
- opened

jobs:
Expand All @@ -15,14 +15,9 @@ jobs:
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Get event creation date
- name: Get current date
id: date
run: |
if [[ "${{ github.event_name }}" == "issues" ]]; then
echo "date=${{ github.event.issue.created_at }}" >> $GITHUB_ENV
elif [[ "${{ github.event_name }}" == "pull_request" ]]; then
echo "date=${{ github.event.pull_request.created_at }}" >> $GITHUB_ENV
fi
run: echo "date=$(date +'%Y-%m-%dT%H:%M:%S')" >> $GITHUB_ENV
- name: Add to project
uses: actions/[email protected]
with:
Expand All @@ -35,5 +30,5 @@ jobs:
project-url: https://github.com/orgs/esx-framework/projects/9
github-token: ${{ secrets.MY_GITHUB_TOKEN }}
item-id: ${{ steps.add-project.outputs.itemId }}
field-keys: Date
field-values: ${{ env.date }},
field-keys: Date,Priority
field-values: ${{ env.date }},Unrealised

0 comments on commit 81933ec

Please sign in to comment.