Skip to content

Commit

Permalink
ci: initial CI implementation
Browse files Browse the repository at this point in the history
includes a raw YAML file which is used to make defining the main YAML
more efficient by taking advantage of YAML achors, which are not
supported by GitHub's YAML parser.
  • Loading branch information
nrdxp committed Sep 19, 2023
1 parent 3dfef18 commit 72096a0
Show file tree
Hide file tree
Showing 2 changed files with 96 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/_ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# yq '. | explode(.)' .github/_ci.yml >| .github/workflows/ci.yml
name: CI For CloudFlare Dynamic DNS client

on:
pull_request:
branches:
- master
push:
branches:
- master

permissions:
contents: read

concurrency:
group: std-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
discover:
outputs:
hits: ${{ steps.discovery.outputs.hits }}
runs-on: ubuntu-latest
steps:
- uses: nixbuild/nix-quick-install-action@v25
- uses: DeterminateSystems/magic-nix-cache-action@v2
- uses: divnix/std-action/discover@main
id: discovery

packages: &job
needs: discover
name: ${{ matrix.target.jobName }}
runs-on: ubuntu-latest
if: fromJSON(needs.discover.outputs.hits).packages.build != ''
strategy:
matrix:
target: ${{ fromJSON(needs.discover.outputs.hits).packages.build }}
steps:
- uses: nixbuild/nix-quick-install-action@v25
- uses: DeterminateSystems/magic-nix-cache-action@v2
- uses: divnix/std-action/run@main

shells:
<<: *job
if: fromJSON(needs.discover.outputs.hits).shells.build != ''
strategy:
matrix:
target: ${{ fromJSON(needs.discover.outputs.hits).shells.build }}
48 changes: 48 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# yq '. | explode(.)' .github/_ci.yml >| .github/workflows/ci.yml
name: CI For CloudFlare Dynamic DNS client
on:
pull_request:
branches:
- master
push:
branches:
- master
permissions:
contents: read
concurrency:
group: std-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
discover:
outputs:
hits: ${{ steps.discovery.outputs.hits }}
runs-on: ubuntu-latest
steps:
- uses: nixbuild/nix-quick-install-action@v25
- uses: DeterminateSystems/magic-nix-cache-action@v2
- uses: divnix/std-action/discover@main
id: discovery
packages:
needs: discover
name: ${{ matrix.target.jobName }}
runs-on: ubuntu-latest
if: fromJSON(needs.discover.outputs.hits).packages.build != ''
strategy:
matrix:
target: ${{ fromJSON(needs.discover.outputs.hits).packages.build }}
steps:
- uses: nixbuild/nix-quick-install-action@v25
- uses: DeterminateSystems/magic-nix-cache-action@v2
- uses: divnix/std-action/run@main
shells:
needs: discover
name: ${{ matrix.target.jobName }}
runs-on: ubuntu-latest
steps:
- uses: nixbuild/nix-quick-install-action@v25
- uses: DeterminateSystems/magic-nix-cache-action@v2
- uses: divnix/std-action/run@main
if: fromJSON(needs.discover.outputs.hits).shells.build != ''
strategy:
matrix:
target: ${{ fromJSON(needs.discover.outputs.hits).shells.build }}

0 comments on commit 72096a0

Please sign in to comment.