Skip to content

Merge pull request #40 from kmc-jp/segre5458-patch-1 #51

Merge pull request #40 from kmc-jp/segre5458-patch-1

Merge pull request #40 from kmc-jp/segre5458-patch-1 #51

Workflow file for this run

name: create template issue
on:
- push
permissions:
contents: read
issues: write
jobs:
create-template-issue:
strategy:
matrix:
# .github/issues/以下のMarkdownファイルのファイル名を列挙(拡張子なし)
filename: ["front-title", "pop-title", "ndl"]
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Get all parents
# https://git-scm.com/docs/git-rev-parse#_other_rev_parent_shorthand_notations
run: echo "HAS_PARENT=$(git rev-parse HEAD^@ | wc -l)" >> $GITHUB_ENV
- name: Create template issue
# テンプレートから引っ張ってきた初回時のみ発火させる
# git rev-parse HEAD^@は親がない場合(最初のコミットの場合)空白となり、それ以外は最初のコミットを指す
if: env.HAS_PARENT == '0'
uses: JasonEtco/create-an-issue@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
filename: .github/issues/${{ matrix.filename }}.md