-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add automatic-project-board workflow
- Loading branch information
Showing
1 changed file
with
39 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Add issue or pull request to project board | ||
|
||
on: | ||
issues: | ||
types: | ||
- opened | ||
pull_request: | ||
types: | ||
- opened | ||
|
||
jobs: | ||
add-to-project: | ||
name: Add issue or pull request to project | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v3 | ||
- name: Get event creation 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 | ||
- name: Add to project | ||
uses: actions/add-to-project@v0.5.0 | ||
with: | ||
project-url: https://github.com/orgs/esx-framework/projects/9 | ||
github-token: ${{ secrets.MY_GITHUB_TOKEN }} | ||
id: add-project | ||
- name: Update project fields | ||
uses: titoportas/update-project-fields@v0.1.0 | ||
with: | ||
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 }}, |