Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(cli): removes dependency on KCL CLI #123

Merged
merged 5 commits into from
Jan 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Install Forge
uses: input-output-hk/catalyst-forge/actions/install@master
uses: input-output-hk/catalyst-forge/actions/install@remove-kcl-dep
if: ${{ inputs.forge_version != 'local' }}
with:
version: ${{ inputs.forge_version }}
- name: Install Local Forge
uses: input-output-hk/catalyst-forge/actions/install-local@master
uses: input-output-hk/catalyst-forge/actions/install-local@remove-kcl-dep
if: ${{ inputs.forge_version == 'local' }}
with:
earthly_token: ${{ secrets.earthly_token }}
Expand All @@ -67,14 +67,14 @@ jobs:
echo "skip=false" >> $GITHUB_OUTPUT
fi
- name: Setup CI
uses: input-output-hk/catalyst-forge/actions/setup@master
uses: input-output-hk/catalyst-forge/actions/setup@remove-kcl-dep
with:
skip_docker: 'true'
skip_github: 'true'
skip_earthly: ${{ steps.local.outputs.skip }}
- name: Discovery
id: discovery
uses: input-output-hk/catalyst-forge/actions/discovery@master
uses: input-output-hk/catalyst-forge/actions/discovery@remove-kcl-dep
with:
filters: |
${{ env.FORGE_REGEX_CHECK }}
Expand All @@ -86,7 +86,7 @@ jobs:
${{ env.FORGE_REGEX_PUBLISH }}
${{ env.FORGE_REGEX_NIGHTLY }}
check:
uses: input-output-hk/catalyst-forge/.github/workflows/run.yml@master
uses: input-output-hk/catalyst-forge/.github/workflows/run.yml@remove-kcl-dep
needs: [discover]
if: (fromJson(needs.discover.outputs.earthfiles)['^check(-.*)?$'] != null) && !failure() && !cancelled()
with:
Expand All @@ -98,7 +98,7 @@ jobs:
earthly_token: ${{ secrets.earthly_token }}

build:
uses: input-output-hk/catalyst-forge/.github/workflows/run.yml@master
uses: input-output-hk/catalyst-forge/.github/workflows/run.yml@remove-kcl-dep
needs: [discover, check]
if: (fromJson(needs.discover.outputs.earthfiles)['^build(-.*)?$'] != null) && !failure() && !cancelled()
with:
Expand All @@ -110,7 +110,7 @@ jobs:
earthly_token: ${{ secrets.earthly_token }}

package:
uses: input-output-hk/catalyst-forge/.github/workflows/run.yml@master
uses: input-output-hk/catalyst-forge/.github/workflows/run.yml@remove-kcl-dep
needs: [discover, check, build]
if: (fromJson(needs.discover.outputs.earthfiles)['^package(-.*)?$'] != null) && !failure() && !cancelled()
with:
Expand All @@ -122,7 +122,7 @@ jobs:
earthly_token: ${{ secrets.earthly_token }}

test:
uses: input-output-hk/catalyst-forge/.github/workflows/run.yml@master
uses: input-output-hk/catalyst-forge/.github/workflows/run.yml@remove-kcl-dep
needs: [discover, check, build, package]
if: (fromJson(needs.discover.outputs.earthfiles)['^test(-.*)?$'] != null) && !failure() && !cancelled()
with:
Expand All @@ -134,7 +134,7 @@ jobs:
earthly_token: ${{ secrets.earthly_token }}

nightly:
uses: input-output-hk/catalyst-forge/.github/workflows/run.yml@master
uses: input-output-hk/catalyst-forge/.github/workflows/run.yml@remove-kcl-dep
needs: [discover, check, build, package]
if: (fromJson(needs.discover.outputs.earthfiles)['^nightly(-.*)?$'] != null) && !failure() && !cancelled() && inputs.nightly == true
with:
Expand All @@ -146,7 +146,7 @@ jobs:
earthly_token: ${{ secrets.earthly_token }}

docs:
uses: input-output-hk/catalyst-forge/.github/workflows/docs.yml@master
uses: input-output-hk/catalyst-forge/.github/workflows/docs.yml@remove-kcl-dep
needs: [discover, check, build, test]
if: (fromJson(needs.discover.outputs.earthfiles)['^docs(-.*)?$'] != null) && !failure() && !cancelled()
with:
Expand All @@ -156,7 +156,7 @@ jobs:
earthly_token: ${{ secrets.earthly_token }}

release:
uses: input-output-hk/catalyst-forge/.github/workflows/release.yml@master
uses: input-output-hk/catalyst-forge/.github/workflows/release.yml@remove-kcl-dep
needs: [discover, check, build, test]
if: (fromJson(needs.discover.outputs.releases)[0] != null) && !failure() && !cancelled()
with:
Expand All @@ -168,7 +168,7 @@ jobs:
earthly_token: ${{ secrets.earthly_token }}

deploy:
uses: input-output-hk/catalyst-forge/.github/workflows/deploy.yml@master
uses: input-output-hk/catalyst-forge/.github/workflows/deploy.yml@remove-kcl-dep
needs: [discover, check, build, test, release]
if: (fromJson(needs.discover.outputs.deployments)[0] != null) && !failure() && !cancelled()
with:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Install Forge
uses: input-output-hk/catalyst-forge/actions/install@master
uses: input-output-hk/catalyst-forge/actions/install@remove-kcl-dep
if: ${{ inputs.forge_version != 'local' }}
with:
version: ${{ inputs.forge_version }}
- name: Install Local Forge
uses: input-output-hk/catalyst-forge/actions/install-local@master
uses: input-output-hk/catalyst-forge/actions/install-local@remove-kcl-dep
if: ${{ inputs.forge_version == 'local' }}
with:
earthly_token: ${{ secrets.earthly_token }}
Expand All @@ -61,11 +61,11 @@ jobs:
echo "skip=false" >> $GITHUB_OUTPUT
fi
- name: Setup CI
uses: input-output-hk/catalyst-forge/actions/setup@master
uses: input-output-hk/catalyst-forge/actions/setup@remove-kcl-dep
with:
skip_earthly: ${{ steps.local.outputs.skip }}
- name: Deploy
uses: input-output-hk/catalyst-forge/actions/run@master
uses: input-output-hk/catalyst-forge/actions/run@remove-kcl-dep
with:
command: deploy push
args: ${{ matrix.deployment }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Install Forge
uses: input-output-hk/catalyst-forge/actions/install@master
uses: input-output-hk/catalyst-forge/actions/install@remove-kcl-dep
if: ${{ inputs.forge_version != 'local' }}
with:
version: ${{ inputs.forge_version }}
- name: Install Local Forge
uses: input-output-hk/catalyst-forge/actions/install-local@master
uses: input-output-hk/catalyst-forge/actions/install-local@remove-kcl-dep
if: ${{ inputs.forge_version == 'local' }}
with:
earthly_token: ${{ secrets.earthly_token }}
Expand All @@ -64,11 +64,11 @@ jobs:
echo "skip=false" >> $GITHUB_OUTPUT
fi
- name: Setup CI
uses: input-output-hk/catalyst-forge/actions/setup@master
uses: input-output-hk/catalyst-forge/actions/setup@remove-kcl-dep
with:
skip_earthly: ${{ steps.local.outputs.skip }}
- name: Run
uses: input-output-hk/catalyst-forge/actions/run@master
uses: input-output-hk/catalyst-forge/actions/run@remove-kcl-dep
with:
command: run
args: --artifact ${{ env.OUTPUT }} ${{ matrix.earthfile }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Install Forge
uses: input-output-hk/catalyst-forge/actions/install@master
uses: input-output-hk/catalyst-forge/actions/install@remove-kcl-dep
if: ${{ inputs.forge_version != 'local' }}
with:
version: ${{ inputs.forge_version }}
- name: Install Local Forge
uses: input-output-hk/catalyst-forge/actions/install-local@master
uses: input-output-hk/catalyst-forge/actions/install-local@remove-kcl-dep
if: ${{ inputs.forge_version == 'local' }}
with:
earthly_token: ${{ secrets.earthly_token }}
Expand All @@ -65,11 +65,11 @@ jobs:
echo "skip=false" >> $GITHUB_OUTPUT
fi
- name: Setup CI
uses: input-output-hk/catalyst-forge/actions/setup@master
uses: input-output-hk/catalyst-forge/actions/setup@remove-kcl-dep
with:
skip_earthly: ${{ steps.local.outputs.skip }}
- name: Release
uses: input-output-hk/catalyst-forge/actions/run@master
uses: input-output-hk/catalyst-forge/actions/run@remove-kcl-dep
with:
command: release
args: ${{ matrix.release.project }} ${{ matrix.release.name }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Install Forge
uses: input-output-hk/catalyst-forge/actions/install@master
uses: input-output-hk/catalyst-forge/actions/install@remove-kcl-dep
if: ${{ inputs.forge_version != 'local' }}
with:
version: ${{ inputs.forge_version }}
- name: Install Local Forge
uses: input-output-hk/catalyst-forge/actions/install-local@master
uses: input-output-hk/catalyst-forge/actions/install-local@remove-kcl-dep
if: ${{ inputs.forge_version == 'local' }}
with:
earthly_token: ${{ secrets.earthly_token }}
Expand All @@ -62,11 +62,11 @@ jobs:
echo "skip=false" >> $GITHUB_OUTPUT
fi
- name: Setup CI
uses: input-output-hk/catalyst-forge/actions/setup@master
uses: input-output-hk/catalyst-forge/actions/setup@remove-kcl-dep
with:
skip_earthly: ${{ steps.local.outputs.skip }}
- name: Run
uses: input-output-hk/catalyst-forge/actions/run@master
uses: input-output-hk/catalyst-forge/actions/run@remove-kcl-dep
with:
command: run
args: ${{ matrix.earthfile }}
Expand Down
2 changes: 1 addition & 1 deletion actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ runs:
path: /usr/local/bin/kcl
key: ${{ runner.os }}-kcl-${{ steps.kcl.outputs.version }}
- name: Install KCL
if: steps.cache-kcl.outputs.cache-hit == false
if: steps.kcl.outputs.install && steps.cache-kcl.outputs.cache-hit == false
shell: bash
run: |
WORKDIR="$(mktemp -d)"
Expand Down
5 changes: 0 additions & 5 deletions blueprint.cue
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,6 @@ global: {
}
registry: "ghcr.io"
}

kcl: {
install: true
version: "v0.11.0"
}
}
secrets: [
{
Expand Down
4 changes: 2 additions & 2 deletions cli/Earthfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
VERSION 0.8

deps:
FROM golang:1.23.0-alpine3.19
FROM golang:1.23.0-bookworm

WORKDIR /work

RUN apk add git file
RUN apt-get update && apt-get install -y file

RUN mkdir -p /go/cache && mkdir -p /go/modcache
ENV GOCACHE=/go/cache
Expand Down
Loading
Loading