From 77ec527f311091847b800fee01fd050953a65185 Mon Sep 17 00:00:00 2001 From: tv Date: Wed, 6 Nov 2024 19:16:23 +0100 Subject: initial commit --- .github/dependabot.yml | 8 ++++++++ .github/workflows/ci.yml | 26 ++++++++++++++++++++++++++ .github/workflows/deps.yml | 44 ++++++++++++++++++++++++++++++++++++++++++++ .github/workflows/flake.yml | 32 ++++++++++++++++++++++++++++++++ 4 files changed, 110 insertions(+) create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/deps.yml create mode 100644 .github/workflows/flake.yml (limited to '.github') diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..9922df0 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,8 @@ +version: 2 +updates: + - package-ecosystem: github-actions + directory: "/" + schedule: + interval: daily + commit-message: + prefix: "ci" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..e0e90f4 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,26 @@ +name: CI + +on: + pull_request: + push: + branches: + - main + workflow_dispatch: + +jobs: + build: + name: Build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: DeterminateSystems/nix-installer-action@v11 + + - run: nix -vL --show-trace flake check + + - run: nix -vL --show-trace build + + - uses: actions/upload-artifact@v4 + with: + name: zmk_firmware + path: result diff --git a/.github/workflows/deps.yml b/.github/workflows/deps.yml new file mode 100644 index 0000000..b1ba83b --- /dev/null +++ b/.github/workflows/deps.yml @@ -0,0 +1,44 @@ +name: Dependencies + +on: + schedule: + - cron: '0 0 * * 0' + workflow_dispatch: + +permissions: + pull-requests: write + contents: write + +jobs: + update: + name: Update + runs-on: ubuntu-latest + permissions: + actions: write + contents: write + pull-requests: write + steps: + - uses: actions/checkout@v4 + + - uses: DeterminateSystems/nix-installer-action@v12 + + - run: nix -vL run --show-trace .#update + + - id: create-pr + uses: peter-evans/create-pull-request@v6 + with: + branch: update_zmk_config_deps + delete-branch: true + committer: 'github-actions[bot] ' + author: 'github-actions[bot] ' + commit-message: 'config,nix: update deps' + title: 'config,nix: update deps' + labels: 'dependencies' + body: | + Automated bump of ZMK dependencies + + - uses: benc-uk/workflow-dispatch@v1 + if: ${{ contains(fromJSON('["created", "updated"]'), steps.create-pr.outputs.pull-request-operation) }} + with: + workflow: ci.yml + ref: refs/heads/update_zmk_config_deps diff --git a/.github/workflows/flake.yml b/.github/workflows/flake.yml new file mode 100644 index 0000000..5aef002 --- /dev/null +++ b/.github/workflows/flake.yml @@ -0,0 +1,32 @@ +name: Flake + +on: + schedule: + - cron: '0 0 * * 0' + workflow_dispatch: + +jobs: + update: + name: Update + runs-on: ubuntu-latest + permissions: + actions: write + contents: write + pull-requests: write + steps: + - uses: actions/checkout@v4 + + - uses: DeterminateSystems/nix-installer-action@v11 + + - id: update-flake-lock + uses: DeterminateSystems/update-flake-lock@v21 + with: + commit-msg: 'flake: update inputs' + pr-title: 'flake: update inputs' + pr-labels: 'dependencies' + + - uses: benc-uk/workflow-dispatch@v1 + if: ${{ contains(fromJSON('["created", "updated"]'), steps.update-flake-lock.outputs.pull-request-operation) }} + with: + workflow: ci.yml + ref: refs/heads/update_flake_lock_action -- cgit v1.2.3