Skip to content

Commit e5a34cc

Browse files
Create setup-zig.yml
1 parent da395db commit e5a34cc

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

.github/workflows/setup-zig.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
ame: "setup-zig"
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
action-tag:
7+
description: "Tag for the setup-zig-action"
8+
required: true
9+
default: "main"
10+
11+
jobs:
12+
setup-zig-and-build:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Harden the runner (Audit all outbound calls)
17+
uses: step-security/harden-runner@rc
18+
with:
19+
egress-policy: audit
20+
- uses: actions/checkout@v4
21+
22+
- name: Setup Zig Compiler
23+
id: setup-zig
24+
env:
25+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
26+
uses: step-security/dynamic-uses@v1
27+
with:
28+
uses: step-security/setup-zig@${{ github.event.inputs.action-tag }}
29+
with: >
30+
{
31+
"version": "0.13.0",
32+
"use-cache": "true"
33+
}
34+
- name: Build and Test Zig Project
35+
run: |
36+
echo "Zig setup action completed."
37+
echo "Version: 0.13.0"
38+
echo "Action Tag Used: ${{ github.event.inputs.action-tag }}"
39+
zig build
40+
zig build test

0 commit comments

Comments
 (0)