Skip to content
check-square

GitHub Action

Example for GitHub Action Using Go

v0.2.1 Latest version

Example for GitHub Action Using Go

check-square

Example for GitHub Action Using Go

A GitHub Action that handles text, lists, files, and API requests using Go, configured via TOML

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Example for GitHub Action Using Go

uses: pplmx/[email protected]

Learn more about this action in pplmx/setup-custom-action-by-docker

Choose a version

Example for GitHub Action Using Go

CI Coverage Status

Overview

Example for GitHub Action Using Go is a custom GitHub Action designed to handle text processing, lists, files, and API requests efficiently using Go. The action is configured using a TOML file and runs inside a Docker container.

Features

  • Text Processing: Perform find-and-replace operations on provided text.
  • List Operations: Calculate word count, sum, and average for provided data.
  • API Requests: Fetch data from APIs and extract specific fields.
  • Configuration: Fully configurable via a TOML file.

Inputs

Name Description Required Default
config_path Path to the TOML configuration file No .github/configs/setup-custom-action-by-docker.toml

Outputs

Name Description
processed_text The processed text after find and replace
word_count The total number of words in the text
sum The sum of the numbers
average The average of the numbers
response_field A specific field from the API response

Usage

To use this GitHub Action in your workflow, you can define a step that utilizes it. Here's an example:

name: Example Workflow
on: [ push ]

jobs:
    example-job:
        runs-on: ubuntu-latest
        steps:
            -   uses: actions/checkout@v4

            -   name: Run Example for GitHub Action Using Go
                uses: pplmx/setup-custom-action-by-docker@main

You can also follow this.

Local Development

For instructions on setting up a local development environment and testing this GitHub Action, please refer to the Development Documentation.

License

This project is dual-licensed under either of the following licenses, at your option:

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

For more details, see CONTRIBUTING.md.