Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

A github action to render a ejs template using github context

License

NotificationsYou must be signed in to change notification settings

jaywcjlove/action-ejs

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

Buy me a coffeeCITEST

A github action to render aejs template using github context

Usage

-name:action-ejsuses:jaywcjlove/action-ejs@mainwith:template:<h1><%= name %> <span><%= conclusion %></span></h1>vars:|      { "name": "${{ github.repository }}", "conclusion": "${{ steps.ejs.conclusion }}" }
-name:action-ejsuses:jaywcjlove/action-ejs@mainwith:template:<div><%= LICENSE %></div><div><%= markdown %></div>output:build/demo.htmlvars-file:|      {        "markdown": "./README.md",        "LICENSE": "./LICENSE"      }
-name:action-ejsuses:jaywcjlove/action-ejs@mainwith:template-file:template/demo.htmloutput:build/template/demo.htmlvars:|      { "htmlContent": "${{ env.GITHUB_REF }}" }

Following objects are exposed, and can be used in template file:

  • context: TheContext object in@actions/github
  • process: Theprocess.env object. You can access the environment variables withenv.<key>
-name:action-ejsuses:jaywcjlove/action-ejs@mainwith:template:|      <h1><%= env.GITHUB_REF%></h1> commiter: <%= context.payload.head_commit.author.name%>

Inputs

  • template Input ESJ template string.
  • template-file Input ESJ template file path.
  • vars Input variables. A dictionary of variables in JSON format to be used in the template.default: '{}'
  • vars-file Read the contents of the file into avars.default: '{}'
  • options A JSON format string of options to be passed to the template engine.default: '{}'
  • output output html pathdefault: build/index.html

Outputs

  • content template render result:<!DOCTYPE html><html lang="en">.....

See Also

Contributors

As always, thanks to our amazing contributors!

Made withaction-contributors.

License

Licensed under the MIT License.

About

A github action to render a ejs template using github context

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors4

  •  
  •  
  •  
  •  

[8]ページ先頭

©2009-2025 Movatter.jp