github-action-go

command module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 2, 2023 License: MIT Imports: 10 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

github-action-go

GitHub Action to identify a path of changed files on monorepos, with regex and depth validation.

Example use-case is execution path for Terraform monorepo. The GitHub action fetches changed files from the GitHub PR API, validates paths to determine what directory Terraform execution needs to happen.

  • Using a container for action delivery avoids spending time fetching repo, dependencies, and compiling. Recommended use is container delivery via: docker://paha/github-action-tf-path
  • PR id is taken from GITHUB_REF_NAME, if fails, pr_number input is taken.
  • The path is persisted as a Pull Request label tf_path: PATH for visibility.

Required action inputs:

Input name Description Suggested value
token GitHub token ${{ github.token }}

Optional action inputs:

Input name Description Example value default
include Only output paths that match the regex myproject None
exclude Exclude paths that match the regex mynotes ^.
depth Terrafrom project path depth 1 1
pr_number GitHub PR id ${{ github.event.number }} $GITHUB_REF_NAME

Note:

Example

on:
  pull_request:

jobs:
  terraform:
    name: Debug
    runs-on: ubuntu-latest
    steps:
      - name: Checkout Repository
        uses: actions/checkout@v2

      - name: TF path action
        id: path
        uses: docker://paha/github-action-tf-path:v0.0.2
        with:
          token: ${{ github.token }}

      - name: my path
        run: echo ${{ steps.path.outputs.tf_path }}

References:


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