script

package module
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: May 7, 2022 License: MIT Imports: 2 Imported by: 0

README

Github Action Script.go

This little github action let's you write the rest of your deployment script in Go. Behind the scene, it creates a plugin out of your Go code and executes them.

example of using this Github Action

name: Example
on:
  push:
    branches:
      - "main"

jobs:
  build:
    name: Build
    runs-on: ubuntu-latest
    steps:
      - name: Setup Go 1.18
        uses: actions/setup-go@v2
        with:
          go-version: ^1.18

      - name: Checking out ...
        uses: actions/checkout@v2

      - name: Scripts
        uses: alinz/script.go@main
        with:
          workspace: ${{ github.workspace }} # <- this is important
          paths: .github/workflows/one,.github/workflows/two #<- the path to your go scripts

make sure to pass your workspace folder. Also each go script must be placed inside a unique folder and must have a go.mod file. For a real example, checkout this repo

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunPlugins

func RunPlugins(paths ...string) error

Types

This section is empty.

Directories

Path Synopsis
cmd
script command

Jump to

Keyboard shortcuts

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