File tree Expand file tree Collapse file tree 2 files changed +57
-5
lines changed
Expand file tree Collapse file tree 2 files changed +57
-5
lines changed Original file line number Diff line number Diff line change 1818 contents : write
1919 packages : write
2020
21+ strategy :
22+ matrix :
23+ include :
24+ - os : linux
25+ arch : amd64
26+ - os : linux
27+ arch : arm64
28+ - os : darwin
29+ arch : amd64
30+ - os : darwin
31+ arch : arm64
32+ - os : windows
33+ arch : amd64
34+ suffix : .exe
35+ - os : windows
36+ arch : arm64
37+ suffix : .exe
38+
2139 steps :
2240 - uses : actions/checkout@v4
2341
@@ -27,14 +45,21 @@ jobs:
2745 go-version : " 1.23.3"
2846
2947 - name : Build
30- run : go build -v ./...
48+ run : |
49+ GOOS=${{ matrix.os }} GOARCH=${{ matrix.arch }} go build -o gron-${{ matrix.os }}-${{ matrix.arch }}${{ matrix.suffix || '' }}
3150
3251 - name : Test
3352 run : go test -v ./...
3453
54+ - name : Upload artifact
55+ uses : actions/upload-artifact@v4
56+ with :
57+ name : gron-${{ matrix.os }}-${{ matrix.arch }}${{ matrix.suffix || '' }}
58+ path : gron-${{ matrix.os }}-${{ matrix.arch }}${{ matrix.suffix || '' }}
59+
3560 - name : Release
36- uses : softprops/action-gh-release@v1
61+ uses : softprops/action-gh-release@v2.1.0
3762 if : startsWith(github.ref, 'refs/tags/')
3863 with :
39- files : gron
40- generate_release_notes : true
64+ files : gron-${{ matrix.os }}-${{ matrix.arch }}${{ matrix.suffix || '' }}
65+ generate_release_notes : false
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ A simple and flexible task scheduler in a Docker container that supports both st
1111
1212## Usage
1313
14- ### Basic Example
14+ ### Using Docker Image
1515
1616``` bash
1717docker run --rm \
@@ -22,6 +22,33 @@ docker run --rm \
2222ghcr.io/batonogov/gron:v0.1.1
2323```
2424
25+ ### Using Binary in Your Dockerfile
26+
27+ You can download and use pre-built binaries in your own Docker images. Binaries are available for multiple platforms:
28+
29+ - Linux (amd64, arm64)
30+ - macOS (Intel, Apple Silicon)
31+ - Windows (amd64, arm64)
32+
33+ Example Dockerfile:
34+
35+ ``` dockerfile
36+ FROM alpine:latest
37+
38+ # Download gron binary for linux/amd64
39+ ADD https://github.com/batonogov/gron/releases/download/v0.1.1/gron-linux-amd64 /usr/local/bin/gron
40+
41+ # Make it executable
42+ RUN chmod +x /usr/local/bin/gron
43+
44+ # Your configuration
45+ COPY ./scripts /scripts
46+ ENV TASK_1="*/5 * * * * /scripts/backup.sh"
47+
48+ # Run gron
49+ CMD ["/usr/local/bin/gron" ]
50+ ```
51+
2552### Command Structure
2653
2754``` bash
You can’t perform that action at this time.
0 commit comments