Skip to content

Commit 140b567

Browse files
authored
chore: updates CI to latest version (#6)
1 parent 045d466 commit 140b567

File tree

8 files changed

+96
-32
lines changed

8 files changed

+96
-32
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ name: CI
33
on:
44
push:
55
branches: [master]
6+
tags: ['**']
67
pull_request:
78

89
permissions:
@@ -11,6 +12,6 @@ permissions:
1112
packages: write
1213
jobs:
1314
ci:
14-
uses: input-output-hk/catalyst-forge/.github/workflows/ci.yml@ci/v1.1.0
15+
uses: input-output-hk/catalyst-forge/.github/workflows/ci.yml@ci/v1.2.1
1516
with:
16-
forge_version: 0.2.0
17+
forge_version: 0.4.0

blueprint.cue

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,18 @@
11
version: "1.0"
2-
global: ci: {
3-
local: [
4-
"^check.*$",
5-
"^build.*$",
6-
"^test.*$",
7-
"^release.*$",
8-
"^publish.*$",
9-
]
10-
registries: [
11-
"ghcr.io/input-output-hk/catalyst-forge-playground",
12-
]
13-
providers: github: registry: "ghcr.io"
14-
tagging: {
15-
aliases: {
16-
"go": "examples/go"
17-
"rust": "examples/rust"
18-
}
19-
strategy: "commit"
2+
global: {
3+
ci: {
4+
local: [
5+
"^check.*$",
6+
"^build.*$",
7+
"^test.*$",
8+
]
9+
registries: [
10+
"ghcr.io/input-output-hk/catalyst-forge-playground",
11+
]
12+
providers: github: registry: "ghcr.io"
13+
}
14+
repo: {
15+
defaultBranch: "master"
16+
name: "input-output-hk/catalyst-forge-playground"
2017
}
2118
}

examples/go/Earthfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ test:
4343

4444
RUN go test ./...
4545

46-
release:
46+
github:
4747
FROM scratch
4848

4949
ARG version="v0.0.0"
@@ -61,7 +61,7 @@ release:
6161

6262
SAVE ARTIFACT bin/hello hello
6363

64-
publish:
64+
docker:
6565
FROM debian:bookworm-slim
6666
WORKDIR /workspace
6767

examples/go/blueprint.cue

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@ version: "1.0.0"
22
project: {
33
name: "go"
44
ci: targets: {
5-
publish: {
5+
docker: {
66
args: {
7-
version: string | *"v0.0.0" @env(name="GIT_TAG",type="string")
7+
version: string | *"v0.0.0" @env(name="GIT_TAG_VERSION",type="string")
88
}
99
platforms: [
1010
"linux/amd64",
1111
"linux/arm64",
1212
]
1313
}
14-
release: {
14+
github: {
1515
args: {
16-
version: string | *"v0.0.0" @env(name="GIT_TAG",type="string")
16+
version: string | *"v0.0.0" @env(name="GIT_TAG_VERSION",type="string")
1717
}
1818
platforms: [
1919
"linux/amd64",
@@ -23,4 +23,26 @@ project: {
2323
]
2424
}
2525
}
26+
release: {
27+
docker: {
28+
on: {
29+
merge: {}
30+
tag: {}
31+
}
32+
config: {
33+
tag: _ @forge(name="GIT_COMMIT_HASH")
34+
}
35+
}
36+
github: {
37+
on: tag: {}
38+
config: {
39+
name: string | *"dev" @forge(name="GIT_TAG")
40+
prefix: project.name
41+
token: {
42+
provider: "env"
43+
path: "GITHUB_TOKEN"
44+
}
45+
}
46+
}
47+
}
2648
}

examples/rust/Earthfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ build:
3232

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

35-
release:
35+
github:
3636
FROM scratch
3737

3838
ARG TARGETOS
@@ -47,7 +47,7 @@ release:
4747

4848
SAVE ARTIFACT bin/hello hello
4949

50-
publish:
50+
docker:
5151
FROM debian:bookworm-slim
5252
WORKDIR /workspace
5353

examples/rust/blueprint.cue

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,41 @@ project: {
55
build: {
66
privileged: true
77
}
8-
release: {
8+
docker: {
99
platforms: [
1010
"linux/amd64",
1111
"linux/arm64",
1212
]
1313
privileged: true
1414
}
15-
publish: {
15+
github: {
1616
platforms: [
1717
"linux/amd64",
1818
"linux/arm64",
1919
]
2020
privileged: true
2121
}
2222
}
23+
release: {
24+
docker: {
25+
on: {
26+
merge: {}
27+
tag: {}
28+
}
29+
config: {
30+
tag: _ @forge(name="GIT_COMMIT_HASH")
31+
}
32+
}
33+
github: {
34+
on: tag: {}
35+
config: {
36+
name: string | *"dev" @forge(name="GIT_TAG")
37+
prefix: project.name
38+
token: {
39+
provider: "env"
40+
path: "GITHUB_TOKEN"
41+
}
42+
}
43+
}
44+
}
2345
}

users/jmgilman/Earthfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ test:
4545
RUN uv sync --frozen --extra dev
4646
RUN uv run pytest .
4747

48-
publish:
48+
docker:
4949
FROM python:3.12-slim
5050

5151
ARG container=hello
@@ -60,7 +60,7 @@ publish:
6060
ENTRYPOINT ["hello"]
6161
SAVE IMAGE ${container}:${tag}
6262

63-
release:
63+
github:
6464
FROM scratch
6565

6666
COPY +build/dist dist

users/jmgilman/blueprint.cue

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,26 @@
11
version: "1.0.0"
22
project: {
33
name: "hello"
4+
release: {
5+
docker: {
6+
on: {
7+
merge: {}
8+
tag: {}
9+
}
10+
config: {
11+
tag: _ @forge(name="GIT_COMMIT_HASH")
12+
}
13+
}
14+
github: {
15+
on: tag: {}
16+
config: {
17+
name: string | *"dev" @forge(name="GIT_TAG")
18+
prefix: project.name
19+
token: {
20+
provider: "env"
21+
path: "GITHUB_TOKEN"
22+
}
23+
}
24+
}
25+
}
426
}

0 commit comments

Comments
 (0)