Skip to content

Commit

Permalink
feat(ci): adds nightly job (#113)
Browse files Browse the repository at this point in the history
  • Loading branch information
kukkok3 authored Jan 17, 2025
1 parent 710ecda commit a0516ff
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 3 deletions.
22 changes: 20 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ on:
required: false
type: string
default: "info"
nightly:
description: Runs nightly targets
required: false
type: boolean
default: false
secrets:
earthly_token:
description: Optional Earthly token used to login to Earthly cloud during local builds of Forge CLI
Expand All @@ -30,6 +35,7 @@ env:
FORGE_REGEX_DOCS: ^docs(-.*)?$
FORGE_REGEX_RELEASE: ^release(-.*)?$
FORGE_REGEX_PUBLISH: ^publish(-.*)?$
FORGE_REGEX_NIGHTLY: ^nightly(-.*)?$

jobs:
discover:
Expand Down Expand Up @@ -78,7 +84,7 @@ jobs:
${{ env.FORGE_REGEX_DOCS }}
${{ env.FORGE_REGEX_RELEASE }}
${{ env.FORGE_REGEX_PUBLISH }}
${{ env.FORGE_REGEX_NIGHTLY }}
check:
uses: input-output-hk/catalyst-forge/.github/workflows/run.yml@master
needs: [discover]
Expand Down Expand Up @@ -127,6 +133,18 @@ jobs:
secrets:
earthly_token: ${{ secrets.earthly_token }}

nightly:
uses: input-output-hk/catalyst-forge/.github/workflows/run.yml@master
needs: [discover, check, build, package]
if: (fromJson(needs.discover.outputs.earthfiles)['^nightly(-.*)?$'] != null) && !failure() && !cancelled() && inputs.nightly == true
with:
earthfiles: ${{ toJson(fromJson(needs.discover.outputs.earthfiles)['^nightly(-.*)?$']) }}
forge_version: ${{ inputs.forge_version }}
local: ${{ inputs.local }}
verbosity: ${{ inputs.verbosity }}
secrets:
earthly_token: ${{ secrets.earthly_token }}

docs:
uses: input-output-hk/catalyst-forge/.github/workflows/docs.yml@master
needs: [discover, check, build, test]
Expand Down Expand Up @@ -162,7 +180,7 @@ jobs:
earthly_token: ${{ secrets.earthly_token }}

final:
needs: [check, build, package, test, release, deploy]
needs: [check, build, package, test, nightly, release, deploy]
if: ${{ always() && (contains(needs.*.result, 'failure') || !failure() && !cancelled()) }}
runs-on: ubuntu-latest
steps:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/dogfood.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@ jobs:
with:
forge_version: local
verbosity: debug
nightly: true
secrets:
earthly_token: ${{ secrets.EARTHLY_TOKEN }}
7 changes: 6 additions & 1 deletion Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,9 @@ VERSION 0.8
test:
FROM ubuntu:latest

RUN echo "Testing"
RUN echo "Testing"

nightly-test:
FROM ubuntu:latest

RUN echo "Nightly testing"
1 change: 1 addition & 0 deletions blueprint.cue
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ global: {
"^build(-.*)?$",
"^package(-.*)?$",
"^test(-.*)?$",
"^nightly(-.*)?$",
]
registries: [
"ghcr.io/input-output-hk/catalyst-forge",
Expand Down

0 comments on commit a0516ff

Please sign in to comment.