Skip to content

Commit 772cf37

Browse files
authored
Merge pull request #9 from 42LM/update_zig_version_to_v0.13
Update zig version to v0.13
2 parents 8f5f956 + bc17f76 commit 772cf37

File tree

6 files changed

+24
-23
lines changed

6 files changed

+24
-23
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
/zig-cache
2+
.zig-cache
23
/zig-out
34
.envrc

Dockerfile

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,28 @@
22
# FROM ziglang/static-base:llvm15-aarch64-3 as ziggy
33
# ENTRYPOINT ./deps/local/bin/zig version
44

5-
FROM jedisct1/minisign:latest as minisign
6-
FROM alpine:3.10 as build-zig
5+
FROM jedisct1/minisign:latest AS minisign
6+
FROM alpine:3.10 AS build-zig
77

88
RUN apk update
99
RUN apk add curl
1010

1111
COPY --from=minisign /usr/local/bin/minisign /usr/local/bin/minisign
12-
COPY ./zig-linux-x86_64-0.12.0.tar.xz.minisig .
12+
COPY ./zig-linux-x86_64-0.13.0.tar.xz.minisig .
1313

14-
RUN curl https://ziglang.org/download/0.12.0/zig-linux-x86_64-0.12.0.tar.xz -O
14+
RUN curl https://ziglang.org/download/0.13.0/zig-linux-x86_64-0.13.0.tar.xz -O
1515
# Verify the signature from zig tarball before installing/using
1616
# Public key from https://ziglang.org/download/
17-
RUN minisign -Vm zig-linux-x86_64-0.12.0.tar.xz -P RWSGOq2NVecA2UPNdBUZykf1CCb147pkmdtYxgb3Ti+JO/wCYvhbAb/U
18-
RUN tar xf zig-linux-x86_64-0.12.0.tar.xz
19-
ENV PATH="/zig-linux-x86_64-0.12.0:${PATH}"
17+
RUN minisign -Vm zig-linux-x86_64-0.13.0.tar.xz -P RWSGOq2NVecA2UPNdBUZykf1CCb147pkmdtYxgb3Ti+JO/wCYvhbAb/U
18+
RUN tar xf zig-linux-x86_64-0.13.0.tar.xz
19+
ENV PATH="/zig-linux-x86_64-0.13.0:${PATH}"
2020
COPY . /zigist
2121
WORKDIR /zigist
2222
RUN zig build
2323

2424
FROM alpine:3.10
2525

26-
COPY --from=build-zig /zig-linux-x86_64-0.12.0 /zig-linux-x86_64-0.12.0
26+
COPY --from=build-zig /zig-linux-x86_64-0.13.0 /zig-linux-x86_64-0.13.0
2727
COPY --from=build-zig /zigist /zigist
2828
WORKDIR /github/workspace
2929
ENTRYPOINT ["../../zigist/zig-out/bin/zigist"]

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Zigist - Update a gist with a random dev joke
2-
[![test](https://github.com/lmllrjr/zigist/actions/workflows/test.yaml/badge.svg)](https://github.com/lmllrjr/zigist/actions/workflows/test.yaml) [![cron](https://github.com/lmllrjr/zigist/actions/workflows/cron.yaml/badge.svg)](https://github.com/lmllrjr/zigist/actions/workflows/cron.yaml)
2+
[![test](https://github.com/42LM/zigist/actions/workflows/test.yaml/badge.svg)](https://github.com/42LM/zigist/actions/workflows/test.yaml) [![cron](https://github.com/42LM/zigist/actions/workflows/cron.yaml/badge.svg)](https://github.com/42LM/zigist/actions/workflows/cron.yaml)
33

44
Nothing fancy here. This is just a simple github action to update a gist with a random dev joke using [Zig ⚡️](https://github.com/ziglang/zig).
55

@@ -14,9 +14,9 @@ with:
1414
> [!TIP]
1515
> Pin the gist in your profile:
1616
> <br>
17-
> <img width="466" alt="Screenshot 2024-03-18 at 01 00 19" src="https://github.com/lmllrjr/zigist/assets/93522910/a5ea6d0e-fdd0-442d-9375-5b9d6876d89b">
17+
> <img width="466" alt="Screenshot 2024-03-18 at 01 00 19" src="https://github.com/42LM/zigist/assets/93522910/a5ea6d0e-fdd0-442d-9375-5b9d6876d89b">
1818
> <br>
19-
> [See it in ~action~ the wild](https://github.com/lmllrjr)
19+
> [See it in ~action~ the wild](https://github.com/42LM)
2020
2121
## Inputs
2222
|Input Name|Description|Required|
@@ -29,7 +29,7 @@ with:
2929
> #### `gist-id`: The GitHub gist needs to be created with the file name `NEWS.md`.[^2]
3030

3131
## Example usage
32-
https://github.com/lmllrjr/zigist/blob/d37412dd9250a000898ba2ba1313edefadf19204/.github/workflows/cron.yaml#L1-L16
32+
https://github.com/42LM/zigist/blob/d37412dd9250a000898ba2ba1313edefadf19204/.github/workflows/cron.yaml#L1-L16
3333

3434
## Local environment setup
3535
The following two environment variables need to be set up:
@@ -59,5 +59,5 @@ docker build -t ziglang/static-v0.11.0 .
5959
docker run --name zigist ziglang/static-v0.11.0 $GH_TOKEN $GIST_ID
6060
```
6161

62-
[^1]: Place repository secret: ![Screenshot 2024-03-17 at 23 54 25](https://github.com/lmllrjr/zigist/assets/93522910/667ad7a8-bc4e-4115-85bf-61945095f1dc)
63-
[^2]: Create github gist with filename `NEWS.md`: ![Screenshot 2024-03-17 at 23 30 13](https://github.com/lmllrjr/zigist/assets/93522910/e0b614d2-131f-480e-9203-0c08f1b77a7e)
62+
[^1]: Place repository secret: ![Screenshot 2024-03-17 at 23 54 25](https://github.com/42LM/zigist/assets/93522910/667ad7a8-bc4e-4115-85bf-61945095f1dc)
63+
[^2]: Create github gist with filename `NEWS.md`: ![Screenshot 2024-03-17 at 23 30 13](https://github.com/42LM/zigist/assets/93522910/e0b614d2-131f-480e-9203-0c08f1b77a7e)

build.zig

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ pub fn build(b: *std.Build) void {
1111
.optimize = optimize,
1212
});
1313

14-
exe.root_module.addAnonymousImport("datetime", .{ .root_source_file = .{ .path = b.pathFromRoot("lib/datetime.zig") } });
15-
exe.root_module.addAnonymousImport("env", .{ .root_source_file = .{ .path = b.pathFromRoot("lib/env.zig") } });
16-
exe.root_module.addAnonymousImport("http", .{ .root_source_file = .{ .path = b.pathFromRoot("lib/http.zig") } });
17-
exe.root_module.addAnonymousImport("payload", .{ .root_source_file = .{ .path = b.pathFromRoot("lib/payload.zig") } });
14+
exe.root_module.addAnonymousImport("datetime", .{ .root_source_file = .{ .src_path = .{ .sub_path = b.pathFromRoot("lib/datetime.zig"), .owner = b } } });
15+
exe.root_module.addAnonymousImport("env", .{ .root_source_file = .{ .src_path = .{ .sub_path = b.pathFromRoot("lib/env.zig"), .owner = b } } });
16+
exe.root_module.addAnonymousImport("http", .{ .root_source_file = .{ .src_path = .{ .sub_path = b.pathFromRoot("lib/http.zig"), .owner = b } } });
17+
exe.root_module.addAnonymousImport("payload", .{ .root_source_file = .{ .src_path = .{ .sub_path = b.pathFromRoot("lib/payload.zig"), .owner = b } } });
1818

1919
b.installArtifact(exe);
2020
const run_cmd = b.addRunArtifact(exe);
@@ -34,7 +34,7 @@ pub fn build(b: *std.Build) void {
3434
for (test_paths, 0..) |path, i| {
3535
const unit_tests = b.addTest(.{
3636
.name = test_names[i],
37-
.root_source_file = .{ .path = path },
37+
.root_source_file = .{ .src_path = .{ .sub_path = path, .owner = b } },
3838
.target = target,
3939
.optimize = optimize,
4040
});

zig-linux-x86_64-0.12.0.tar.xz.minisig

Lines changed: 0 additions & 4 deletions
This file was deleted.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
untrusted comment: signature from minisign secret key
2+
RUSGOq2NVecA2aM2pTseOP756a29t33Ac9gE9f4jZuoXQVXNZ2kYoeVTuKOER5uQNPfZ+SdBa8uSCIyewXIbAaWWltW5ouG/rwQ=
3+
trusted comment: timestamp:1717729444 file:zig-linux-x86_64-0.13.0.tar.xz hashed
4+
7Oots3dd6k0N8skNUp9hoi9cqp1R9Egp4k5AMkj45qLNQ4loF/7fc2L0wtfSdMd3JAE4zrAQSiOx8qj3dEI4DA==

0 commit comments

Comments
 (0)