Skip to content

GHA Summarizer

Actions
Simple templating for Github Actions
1.0.0
Latest
Star (0)

Tags

 (1)

GHA Summarizer GHA Summarizer

Simple action for Go template based summarization of GitHub Actions workflow runs. It supports usual Go templating features, check text/template for more details.

Usage

- name: Render template
  uses: VOID404/[email protected]
  with:
    template: hack/summary_template.md
    out-file: summary.md
- name: Set step output
  run: cat summary.md >> $GITHUB_STEP_SUMMARY

Functions

Additionally some helper functions are provided:

filep

Check if file exists.

{{ if filep "./example/code.go" -}}
```go
{{ file "./example/code.go"}}
```
{{- end }}

file

Embedd file content in the template.

# Sample template
```go
{{ file "./example/code.go"}}
```

envp

Checks if environment variable is set.

{{ if envp "GITHUB_REPOSITORY" -}}
{{ env "$GITHUB_REPOSITORY }}
{{- end }}

env

Get environment variable value. This has access to github context, so you can use it to get values from the workflow run.

```md
# Sample template
Generated from `{{ env "$GITHUB_REPOSITORY" }}`
```

GHA Summarizer is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

Simple templating for Github Actions
1.0.0
Latest

Tags

 (1)

GHA Summarizer is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.