Skip to content

Commit ff53a4e

Browse files
committed
use and verify status.txt
1 parent c7598ac commit ff53a4e

File tree

3 files changed

+33
-2
lines changed

3 files changed

+33
-2
lines changed

.github/workflows/dagger.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ on:
66
- dagger-generic
77
- dagger-generic-pipeline
88
- dagger-generic-pipeline-int
9+
- dagger-generic-pipeline-int-status
910
jobs:
1011
pipeline:
1112
runs-on: 'ubuntu-latest'
@@ -48,3 +49,20 @@ jobs:
4849
with:
4950
name: pipeline-artifacts
5051
path: reports
52+
- name: 'status'
53+
uses: dagger/[email protected]
54+
with:
55+
# Dagger Version
56+
version: 0.16.3
57+
# Dagger CLI Flags
58+
#dagger-flags: # optional, default is --progress plain
59+
# CLI verb (call, run, download, up, functions, shell, query)
60+
verb: call
61+
# The working directory in which to run the Dagger CLI
62+
workdir: .
63+
# Dagger Cloud Token
64+
cloud-token: ${{ secrets.DAGGER_CLOUD_TOKEN }}
65+
# Dagger module to call. Local or Git
66+
module: .
67+
# Arguments to pass to CLI
68+
args: verify --file=reports/status.txt

ci/main.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,3 +254,16 @@ func (m *Ci) CiIntegration(
254254
dagger.PitcFlowRunOpts{Pass: pass},
255255
)
256256
}
257+
258+
func (m *Ci) Verify(
259+
ctx context.Context,
260+
file *dagger.File,
261+
) (string, error) {
262+
size, _ := file.Size(ctx)
263+
if size > 0 {
264+
content, _ := file.Contents(ctx)
265+
return content, fmt.Errorf("%w", content)
266+
} else {
267+
return "", nil
268+
}
269+
}

dagger.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
"dependencies": [
88
{
99
"name": "pitc-flow",
10-
"source": "github.com/puzzle/dagger-module-pitc-flow/pitc-flow@v0.1.0",
11-
"pin": "c010a7e8beb8e97553ee89dd03bd17221485b44d"
10+
"source": "github.com/puzzle/dagger-module-pitc-flow/pitc-flow@71d566285ce416a9c2d42dd59d3712beb326abe9",
11+
"pin": "71d566285ce416a9c2d42dd59d3712beb326abe9"
1212
}
1313
],
1414
"source": "ci"

0 commit comments

Comments
 (0)