Skip to content

Commit

Permalink
chore: merge branch 'master' into adds-docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jmgilman committed Sep 20, 2024
2 parents 95a2e2f + 1cee2a5 commit d452d89
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 17 deletions.
47 changes: 35 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@ on:
description: Optional Earthly token used to login to Earthly cloud during local builds of Forge CLI
required: false

env:
FORGE_REGEX_CHECK: ^check(-.*)?$
FORGE_REGEX_BUILD: ^build(-.*)?$
FORGE_REGEX_PACKAGE: ^package(-.*)?$
FORGE_REGEX_TEST: ^test(-.*)?$
FORGE_REGEX_RELEASE: ^release(-.*)?$
FORGE_REGEX_PUBLISH: ^publish(-.*)?$

jobs:
discover:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -42,7 +50,6 @@ jobs:
- name: Setup CI
uses: input-output-hk/catalyst-forge/actions/setup@master
with:
skip_aws: 'true'
skip_docker: 'true'
skip_github: 'true'
skip_earthly: ${{ steps.local.outputs.skip }}
Expand All @@ -51,53 +58,69 @@ jobs:
uses: input-output-hk/catalyst-forge/actions/discovery@master
with:
filters: |
^build.*
^check.*
^test.*
publish
release
^check(-.*)?$
^build(-.*)?$
^package(-.*)?$
^test(-.*)?$
^release(-.*)?$
^publish(-.*)?$
check:
uses: ./.github/workflows/run.yml
needs: [discover]
if: (fromJson(needs.discover.outputs.result)['^check(-.*)?$'] != null) && !failure() && !cancelled()
with:
earthfiles: ${{ toJson(fromJson(needs.discover.outputs.result)['^check.*']) }}
earthfiles: ${{ toJson(fromJson(needs.discover.outputs.result)['^check(-.*)?$']) }}
forge_version: ${{ inputs.forge_version }}
secrets:
earthly_token: ${{ secrets.earthly_token }}

build:
uses: ./.github/workflows/run.yml
needs: [discover, check]
if: (fromJson(needs.discover.outputs.result)['^build(-.*)?$'] != null) && !failure() && !cancelled()
with:
earthfiles: ${{ toJson(fromJson(needs.discover.outputs.result)['^build.*']) }}
earthfiles: ${{ toJson(fromJson(needs.discover.outputs.result)['^build(-.*)?$']) }}
forge_version: ${{ inputs.forge_version }}
secrets:
earthly_token: ${{ secrets.earthly_token }}

test:
package:
uses: ./.github/workflows/run.yml
needs: [discover, check, build]
if: (fromJson(needs.discover.outputs.result)['^package(-.*)?$'] != null) && !failure() && !cancelled()
with:
earthfiles: ${{ toJson(fromJson(needs.discover.outputs.result)['^package(-.*)?$']) }}
forge_version: ${{ inputs.forge_version }}
secrets:
earthly_token: ${{ secrets.earthly_token }}

test:
uses: ./.github/workflows/run.yml
needs: [discover, check, build, package]
if: (fromJson(needs.discover.outputs.result)['^test(-.*)?$'] != null) && !failure() && !cancelled()
with:
earthfiles: ${{ toJson(fromJson(needs.discover.outputs.result)['^test.*']) }}
earthfiles: ${{ toJson(fromJson(needs.discover.outputs.result)['^test(-.*)?$']) }}
forge_version: ${{ inputs.forge_version }}
secrets:
earthly_token: ${{ secrets.earthly_token }}

publish:
uses: ./.github/workflows/publish.yml
needs: [discover, check, build, test]
if: (fromJson(needs.discover.outputs.result)['^publish(-.*)?$'] != null) && !failure() && !cancelled()
with:
earthfiles: ${{ toJson(fromJson(needs.discover.outputs.result)['publish']) }}
earthfiles: ${{ toJson(fromJson(needs.discover.outputs.result)['^publish(-.*)?$']) }}
forge_version: ${{ inputs.forge_version }}
secrets:
earthly_token: ${{ secrets.earthly_token }}

release:
uses: ./.github/workflows/release.yml
needs: [discover, check, build, test]
if: (fromJson(needs.discover.outputs.result)['^release(-.*)?$'] != null) && !failure() && !cancelled()
with:
earthfiles: ${{ toJson(fromJson(needs.discover.outputs.result)['release']) }}
earthfiles: ${{ toJson(fromJson(needs.discover.outputs.result)['^release(-.*)?$']) }}
forge_version: ${{ inputs.forge_version }}
secrets:
earthly_token: ${{ secrets.earthly_token }}
11 changes: 6 additions & 5 deletions blueprint.cue
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ version: "1.0"
global: {
ci: {
local: [
"^check.*$",
"^build.*$",
"^test.*$",
"^release.*$",
"^publish.*$",
"^check(-.*)?$",
"^build(-.*)?$",
"^package(-.*)?$",
"^test(-.*)?$",
"^release(-.*)?$",
"^publish(-.*)?$",
]
registries: [
ci.providers.aws.registry,
Expand Down

0 comments on commit d452d89

Please sign in to comment.