Skip to content

Commit

Permalink
[update #1] add ci
Browse files Browse the repository at this point in the history
  • Loading branch information
tiawl authored Apr 25, 2024
2 parents beeee8e + d90cec8 commit 78150ef
Show file tree
Hide file tree
Showing 2 changed files with 121 additions and 0 deletions.
105 changes: 105 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
name: ci

on:
pull_request:
branches:
- trunk

jobs:
test:
permissions:
contents: write
strategy:
matrix:
repo:
- dep: toolbox
user: vulkan.zig
- dep: toolbox
user: wayland.zig
- dep: toolbox
user: X11.zig
- dep: toolbox
user: glfw.zig
- dep: toolbox
user: cimgui.zig
- dep: toolbox
user: spirv.zig
- dep: toolbox
user: glslang.zig
- dep: toolbox
user: shaderc.zig
- dep: vulkan.zig
user: glfw.zig
- dep: wayland.zig
user: glfw.zig
- dep: X11.zig
user: glfw.zig
- dep: glfw.zig
user: cimgui.zig
- dep: cimgui.zig
user: spaceporn
- dep: spirv.zig
user: shaderc.zig
- dep: glslang.zig
user: shaderc.zig
- dep: shaderc.zig
user: spaceporn
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
repository: "${{ github.repository_owner }}/${{ matrix.repo.dep }}"
fetch-depth: 0
fetch-tags: true

- name: Prepare CD
id: prepare
run: |
tag="$(git describe --tags --abbrev=0)"
git checkout "${tag}"
printf 'tag=%s\n' "${tag}" >> "${GITHUB_OUTPUT}"
- uses: tiawl/spaceporn-dep-action-cd-ping@ci
with:
repository_name: "${{ matrix.repo.dep }}"
user: "${{ matrix.repo.user }}"
tag: "${{ steps.prepare.outputs.tag }}"
token: "${{ secrets.PAT }}"

ping:
permissions:
contents: write
strategy:
matrix:
repo:
- vulkan.zig
- wayland.zig
- X11.zig
- glfw.zig
- cimgui.zig
- spirv.zig
- glslang.zig
- shaderc.zig
- spaceporn
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
repository: "${{ github.repository_owner }}/${{ matrix.repo }}"
fetch-depth: 0
fetch-tags: true

- name: Prepare dump
id: prepare
run: |
tag="$(git describe --tags --abbrev=0 || :)"
if [[ -n "${tag}" ]]; then git checkout "${tag}"
else tag='0.0.0'; fi
printf 'tag=%s\n' "${tag}" >> "${GITHUB_OUTPUT}"
- uses: tiawl/spaceporn-dep-action-cd-ping@ci
with:
repository_name: "${{ matrix.repo }}"
user: "${{ github.event.repository.name }}"
tag: "${{ steps.prepare.outputs.tag }}"
token: "${{ secrets.PAT }}"
16 changes: 16 additions & 0 deletions .github/workflows/dump.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: dump

on:
repository_dispatch:
types:
- ping

jobs:
dump:
runs-on: ubuntu-latest
steps:
- name: Dump client_payload
env:
CLIENT_PAYLOAD: ${{ toJson(github.event.client_payload) }}
run: |
printf '%s\n' "${CLIENT_PAYLOAD}"

0 comments on commit 78150ef

Please sign in to comment.