From a9195cc1924bf6959ff846e537982f44c7606bf5 Mon Sep 17 00:00:00 2001 From: r17x Date: Thu, 23 May 2024 22:22:44 +0700 Subject: [PATCH] ci: add gh actions --- .github/dependabot.yml | 6 ++++++ .github/workflows/ci.yml | 27 +++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/ci.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..1230149 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,6 @@ +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "daily" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..b3b687d --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,27 @@ +name: "CI" +on: + pull_request: + push: + branches: [main] +jobs: + build: + strategy: + matrix: + os: [macos-latest] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + - uses: DeterminateSystems/flake-checker-action@v5 + - uses: cachix/install-nix-action@v26 + with: + github_access_token: ${{ secrets.GH_TOKEN }} + - uses: cachix/cachix-action@v14 + with: + name: r17 + # If you chose signing key for write access + # signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}' + # If you chose API tokens for write access OR if you have a private cache + authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}" + extraPullNames: pre-commit-hooks,nix-community + skipPush: ${{ !(github.ref == 'refs/heads/main' && github.event_name == 'push' && matrix.os == 'macos-14') }} + - run: nix build .#darwinConfigurations.eR17.system