Skip to content

Commit

Permalink
chore: updates CI to latest version (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmgilman authored Oct 22, 2024
1 parent 045d466 commit 140b567
Show file tree
Hide file tree
Showing 8 changed files with 96 additions and 32 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: CI
on:
push:
branches: [master]
tags: ['**']
pull_request:

permissions:
Expand All @@ -11,6 +12,6 @@ permissions:
packages: write
jobs:
ci:
uses: input-output-hk/catalyst-forge/.github/workflows/ci.yml@ci/v1.1.0
uses: input-output-hk/catalyst-forge/.github/workflows/ci.yml@ci/v1.2.1
with:
forge_version: 0.2.0
forge_version: 0.4.0
33 changes: 15 additions & 18 deletions blueprint.cue
Original file line number Diff line number Diff line change
@@ -1,21 +1,18 @@
version: "1.0"
global: ci: {
local: [
"^check.*$",
"^build.*$",
"^test.*$",
"^release.*$",
"^publish.*$",
]
registries: [
"ghcr.io/input-output-hk/catalyst-forge-playground",
]
providers: github: registry: "ghcr.io"
tagging: {
aliases: {
"go": "examples/go"
"rust": "examples/rust"
}
strategy: "commit"
global: {
ci: {
local: [
"^check.*$",
"^build.*$",
"^test.*$",
]
registries: [
"ghcr.io/input-output-hk/catalyst-forge-playground",
]
providers: github: registry: "ghcr.io"
}
repo: {
defaultBranch: "master"
name: "input-output-hk/catalyst-forge-playground"
}
}
4 changes: 2 additions & 2 deletions examples/go/Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ test:

RUN go test ./...

release:
github:
FROM scratch

ARG version="v0.0.0"
Expand All @@ -61,7 +61,7 @@ release:

SAVE ARTIFACT bin/hello hello

publish:
docker:
FROM debian:bookworm-slim
WORKDIR /workspace

Expand Down
30 changes: 26 additions & 4 deletions examples/go/blueprint.cue
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@ version: "1.0.0"
project: {
name: "go"
ci: targets: {
publish: {
docker: {
args: {
version: string | *"v0.0.0" @env(name="GIT_TAG",type="string")
version: string | *"v0.0.0" @env(name="GIT_TAG_VERSION",type="string")
}
platforms: [
"linux/amd64",
"linux/arm64",
]
}
release: {
github: {
args: {
version: string | *"v0.0.0" @env(name="GIT_TAG",type="string")
version: string | *"v0.0.0" @env(name="GIT_TAG_VERSION",type="string")
}
platforms: [
"linux/amd64",
Expand All @@ -23,4 +23,26 @@ project: {
]
}
}
release: {
docker: {
on: {
merge: {}
tag: {}
}
config: {
tag: _ @forge(name="GIT_COMMIT_HASH")
}
}
github: {
on: tag: {}
config: {
name: string | *"dev" @forge(name="GIT_TAG")
prefix: project.name
token: {
provider: "env"
path: "GITHUB_TOKEN"
}
}
}
}
}
4 changes: 2 additions & 2 deletions examples/rust/Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ build:

SAVE ARTIFACT ./target/${TARGET}/release/hello hello

release:
github:
FROM scratch

ARG TARGETOS
Expand All @@ -47,7 +47,7 @@ release:

SAVE ARTIFACT bin/hello hello

publish:
docker:
FROM debian:bookworm-slim
WORKDIR /workspace

Expand Down
26 changes: 24 additions & 2 deletions examples/rust/blueprint.cue
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,41 @@ project: {
build: {
privileged: true
}
release: {
docker: {
platforms: [
"linux/amd64",
"linux/arm64",
]
privileged: true
}
publish: {
github: {
platforms: [
"linux/amd64",
"linux/arm64",
]
privileged: true
}
}
release: {
docker: {
on: {
merge: {}
tag: {}
}
config: {
tag: _ @forge(name="GIT_COMMIT_HASH")
}
}
github: {
on: tag: {}
config: {
name: string | *"dev" @forge(name="GIT_TAG")
prefix: project.name
token: {
provider: "env"
path: "GITHUB_TOKEN"
}
}
}
}
}
4 changes: 2 additions & 2 deletions users/jmgilman/Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ test:
RUN uv sync --frozen --extra dev
RUN uv run pytest .

publish:
docker:
FROM python:3.12-slim

ARG container=hello
Expand All @@ -60,7 +60,7 @@ publish:
ENTRYPOINT ["hello"]
SAVE IMAGE ${container}:${tag}

release:
github:
FROM scratch

COPY +build/dist dist
Expand Down
22 changes: 22 additions & 0 deletions users/jmgilman/blueprint.cue
Original file line number Diff line number Diff line change
@@ -1,4 +1,26 @@
version: "1.0.0"
project: {
name: "hello"
release: {
docker: {
on: {
merge: {}
tag: {}
}
config: {
tag: _ @forge(name="GIT_COMMIT_HASH")
}
}
github: {
on: tag: {}
config: {
name: string | *"dev" @forge(name="GIT_TAG")
prefix: project.name
token: {
provider: "env"
path: "GITHUB_TOKEN"
}
}
}
}
}

0 comments on commit 140b567

Please sign in to comment.