Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/actions-go/build
A simple github action to build actions written in golang.
https://github.com/actions-go/build
Last synced: 5 days ago
JSON representation
A simple github action to build actions written in golang.
- Host: GitHub
- URL: https://github.com/actions-go/build
- Owner: actions-go
- Created: 2023-10-10T20:06:27.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-05-28T17:01:43.000Z (6 months ago)
- Last Synced: 2024-06-21T08:11:38.537Z (5 months ago)
- Language: Go
- Size: 16.6 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# actions-go/build
A simple github action to build actions written in golang.
The best use of this action is to be embedded in a composite action.
```yaml
name: 'My go action'
description: My action is awesome
author: 'John Doe'
runs:
using: "composite"
steps:
- id: build-action
name: Build go action
uses: actions-go/build@v1
with:
action_path: ${{ github.action_path }} # specifies the working directory for go build (usually the folder of your `go.mod` files).
action: ${{ github.action }}
go-version: "1.21" # defaults to 1.21
go-main: '.' # defaults to '.'
- name: Run my action
shell: bash
run: ${{ steps.build-action.outputs.install-path }}
```The action is built in `${action_path}/${action}-(Darwin|Linux|Windows)-(x86_64|arm64)`.
If the build path already exists and is executable, the pre-built action will be used.
This means that you can create releases with a few committed files:
`action.yaml`, `${action}-(Darwin|linux)-(x86_64|arm64)` and `Readme.md`
and drop all your sources to avoid distributing your source code and re-building the action every time.