https://github.com/posener/goaction-example
Simplest goaction example
https://github.com/posener/goaction-example
example github-action go goaction golang
Last synced: 11 months ago
JSON representation
Simplest goaction example
- Host: GitHub
- URL: https://github.com/posener/goaction-example
- Owner: posener
- License: apache-2.0
- Created: 2020-05-02T14:21:34.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-05-08T06:14:11.000Z (over 5 years ago)
- Last Synced: 2024-10-05T12:43:16.482Z (over 1 year ago)
- Topics: example, github-action, go, goaction, golang
- Language: Go
- Homepage: http://github.com/posener/goaction
- Size: 8.79 KB
- Stars: 5
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Goaction Example
an example of the simplest goaction sctipt.
Notice that the only non-generated file is [./main.go](./main.go).
The generated files were generated using Github action [./github/workflows/goaction.yml](./github/workflows/goaction.yml).
The [./main.go](./main.go) is the only non-generated file and is a simple Go script, and can be run with:
```go
$ go run .
```
The [./action.yml](./action.yml) is autogenerated and contains the action definition. Notice that the flag from the
program below appears as the input for the Github action. You can see the action in-action in the
[action page](https://github.com/posener/goaction-example/actions?query=workflow%3A.github%2Fworkflows%2Fgoaction.yml).
The [./Dockerfile](./Dockerfile) is autogenerated and will also run the [./main.go](./main.go) sctipt. You can build and run it
with docker, even if you don't have Go installed on your machine:
```go
$ docker build -t goaction-example .
$ docker run --rm goaction-example
```
This is the simplest program possible. Goaction also provides a library that helps writing Github
action scripts easily.
---
Readme created from Go doc with [goreadme](https://github.com/posener/goreadme)