md-to-blogpost

command module
v0.0.0-...-870cc07 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 17, 2019 License: MIT Imports: 18 Imported by: 0

README

Markdown to Blog post

Make blog post pull request from markdown file.

Usage

action "md2blog" {
  uses = "vvakame/github-actions/md-to-blogpost@master"
  args = ["--name", "blog-repo", "result.md"]
  secrets = ["BLOG_REPO_GITHUB_TOKEN"]
}

new pull request will create.

Secrets

  • BLOG_REPO_GITHUB_TOKEN is required
    • You can use --github_token command line option instead

CLI

$ go run main.go --help
  usage: main --name=NAME [<flags>] <input_path>
  
  Flags:
    --help                   Show context-sensitive help (also try --help-long and --help-man).
    --github_token="$BLOG_REPO_GITHUB_TOKEN"
                             GitHub token for GitHub endpoint request.
    --github_event_path="$GITHUB_EVENT_PATH"
                             GitHub event data json path.
    --owner=OWNER            name of repository owner. default value is from GITHUB_EVENT_PATH.repository.owner.login .
    --name=NAME              name of repository.
    --base_branch="master"   name of base branch.
    --commit_message="auto generated commit"
                             commit message text.
    --timezone="UTC"         timezone for blog post date
    --post_path=POST_PATH    blog post markdown path in repository. default value is source/_posts/YYYY-MM-DD-BranchName.md
    --image_path=IMAGE_PATH  blog post image path in repository. default value is source/images/YYYY-MM-DD-BranchName
    --base_image_url=BASE_IMAGE_URL
                             base image url in blog site. default value is /images/YYYY-MM-DD-BranchName
    --pr_branch=PR_BRANCH    name of pull request branch. default value is from-pr-PRNumber
    --pr_title=PR_TITLE      title of pull request. default value is 'blog post from 'PRTitle”
    --pr_body=PR_BODY        body of pull request. default value is 'from PRURL'
  
  Args:
    <input_path>  input markdown path

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL