-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: added sdlc pipeline and dagger source
Signed-off-by: William Artero <git@artero.dev>
- Loading branch information
Showing
24 changed files
with
1,615 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,7 +21,7 @@ indent_style = tab | |
[*.go] | ||
indent_style = tab | ||
|
||
[go.mod] | ||
[go.{mod,work}] | ||
indent_style = tab | ||
|
||
[.git*] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
name: sdlc-build | ||
description: compiles a Dagger Go application | ||
author: William Artero | ||
|
||
branding: | ||
icon: activity | ||
color: blue | ||
|
||
inputs: | ||
go-version: | ||
description: Go runtime version | ||
required: true | ||
source-dir: | ||
description: Path with the Dagger Go client source code | ||
required: true | ||
output-dir: | ||
description: Path where to generate the compiled binary | ||
default: ./bin | ||
output-bin: | ||
description: Name of the final compiled binary | ||
default: sdlc | ||
|
||
runs: | ||
using: composite | ||
|
||
steps: | ||
- name: setup golang | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: ${{ inputs.go-version }} | ||
|
||
- name: set golang environment variables | ||
uses: wwmoraes/actions/golang/env@master | ||
|
||
- name: cache modules | ||
uses: pat-s/always-upload-cache@v2.1.5 | ||
with: | ||
path: ${GOMODCACHE} | ||
key: ${{ runner.os }}-modules-${{ hashFiles('go.sum') }} | ||
restore-keys: | | ||
${{ runner.os }}-modules-${{ hashFiles('go.sum') }} | ||
${{ runner.os }}-modules- | ||
- name: download modules | ||
run: go mod download | ||
working-directory: ${{ inputs.source-dir }} | ||
shell: sh | ||
|
||
- name: build | ||
uses: wwmoraes/actions/golang/build@master | ||
with: | ||
packages: ./${{ inputs.source-dir }} | ||
output-dir: ${{ inputs.output-dir }} | ||
output-bin: ${{ inputs.output-bin }} | ||
|
||
- name: upload | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: ${{ inputs.output-bin }} | ||
path: ${{ inputs.output-dir }}/${{ inputs.output-bin }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: sdlc-run | ||
description: runs a compiled Dagger Go application | ||
author: William Artero | ||
|
||
branding: | ||
icon: activity | ||
color: blue | ||
|
||
inputs: | ||
output-dir: | ||
description: Path where to generate the compiled binary | ||
default: ./bin | ||
output-bin: | ||
description: Name of the final compiled binary | ||
default: sdlc | ||
dagger-version: | ||
description: Dagger CLI version | ||
required: true | ||
|
||
runs: | ||
using: composite | ||
|
||
steps: | ||
- name: download sdlc | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: ${{ inputs.output-bin }} | ||
path: ${{ inputs.output-dir }} | ||
|
||
- name: run | ||
uses: dagger/dagger-for-github@v5 | ||
with: | ||
verb: run | ||
args: ${{ inputs.output-dir }}/${{ inputs.output-bin }} ${{ github.job }} | ||
version: ${{ inputs.dagger-version }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.