Skip to content

Update new_project.yml #2

Update new_project.yml

Update new_project.yml #2

Workflow file for this run

name: Create New Project
on:
repository_dispatch:
types: ["trigger-event"]
env:
repo: ${{ github.repository }}
org: ${{ github.repository_owner }}
title: ${{ github.event.client_payload.title }}
jobs:
create-project:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up GitHub CLI
uses: ksivamuthu/actions-setup-gh-cli
- name: Authenticate GitHub CLI
run: gh auth login --with-token < ${{ secrets.GITHUB_TOKEN }}
- name: Create GitHub project and issues
run: |
project_url=$(gh project create --owner "$org" --title "$title")
gh project link $(basename project_url)
for file in issue_template/*.md; do
issue_title="$title - ${file%.md}"
gh issue -R "$repo" create --title "$issue_title" --body-file "$file" --project "$title"
done