Skip to content

Commit a0516ff

Browse files
authored
feat(ci): adds nightly job (#113)
1 parent 710ecda commit a0516ff

File tree

4 files changed

+28
-3
lines changed

4 files changed

+28
-3
lines changed

.github/workflows/ci.yml

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ on:
1717
required: false
1818
type: string
1919
default: "info"
20+
nightly:
21+
description: Runs nightly targets
22+
required: false
23+
type: boolean
24+
default: false
2025
secrets:
2126
earthly_token:
2227
description: Optional Earthly token used to login to Earthly cloud during local builds of Forge CLI
@@ -30,6 +35,7 @@ env:
3035
FORGE_REGEX_DOCS: ^docs(-.*)?$
3136
FORGE_REGEX_RELEASE: ^release(-.*)?$
3237
FORGE_REGEX_PUBLISH: ^publish(-.*)?$
38+
FORGE_REGEX_NIGHTLY: ^nightly(-.*)?$
3339

3440
jobs:
3541
discover:
@@ -78,7 +84,7 @@ jobs:
7884
${{ env.FORGE_REGEX_DOCS }}
7985
${{ env.FORGE_REGEX_RELEASE }}
8086
${{ env.FORGE_REGEX_PUBLISH }}
81-
87+
${{ env.FORGE_REGEX_NIGHTLY }}
8288
check:
8389
uses: input-output-hk/catalyst-forge/.github/workflows/run.yml@master
8490
needs: [discover]
@@ -127,6 +133,18 @@ jobs:
127133
secrets:
128134
earthly_token: ${{ secrets.earthly_token }}
129135

136+
nightly:
137+
uses: input-output-hk/catalyst-forge/.github/workflows/run.yml@master
138+
needs: [discover, check, build, package]
139+
if: (fromJson(needs.discover.outputs.earthfiles)['^nightly(-.*)?$'] != null) && !failure() && !cancelled() && inputs.nightly == true
140+
with:
141+
earthfiles: ${{ toJson(fromJson(needs.discover.outputs.earthfiles)['^nightly(-.*)?$']) }}
142+
forge_version: ${{ inputs.forge_version }}
143+
local: ${{ inputs.local }}
144+
verbosity: ${{ inputs.verbosity }}
145+
secrets:
146+
earthly_token: ${{ secrets.earthly_token }}
147+
130148
docs:
131149
uses: input-output-hk/catalyst-forge/.github/workflows/docs.yml@master
132150
needs: [discover, check, build, test]
@@ -162,7 +180,7 @@ jobs:
162180
earthly_token: ${{ secrets.earthly_token }}
163181

164182
final:
165-
needs: [check, build, package, test, release, deploy]
183+
needs: [check, build, package, test, nightly, release, deploy]
166184
if: ${{ always() && (contains(needs.*.result, 'failure') || !failure() && !cancelled()) }}
167185
runs-on: ubuntu-latest
168186
steps:

.github/workflows/dogfood.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,6 @@ jobs:
1717
with:
1818
forge_version: local
1919
verbosity: debug
20+
nightly: true
2021
secrets:
2122
earthly_token: ${{ secrets.EARTHLY_TOKEN }}

Earthfile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,9 @@ VERSION 0.8
44
test:
55
FROM ubuntu:latest
66

7-
RUN echo "Testing"
7+
RUN echo "Testing"
8+
9+
nightly-test:
10+
FROM ubuntu:latest
11+
12+
RUN echo "Nightly testing"

blueprint.cue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ global: {
66
"^build(-.*)?$",
77
"^package(-.*)?$",
88
"^test(-.*)?$",
9+
"^nightly(-.*)?$",
910
]
1011
registries: [
1112
"ghcr.io/input-output-hk/catalyst-forge",

0 commit comments

Comments
 (0)