aboutsummaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2022-10-07 11:59:35 -0700
committerFranck Cuny <franck@fcuny.net>2022-10-07 11:59:35 -0700
commitdc482404d9a35b15d9485ae774618c837d12d673 (patch)
tree2e8c4766454a21cc2786a12e56732ff41f0a0509 /.github
parentref(build): build and deploy with nix (diff)
downloadfcuny.net-dc482404d9a35b15d9485ae774618c837d12d673.tar.gz
ci: add GitHub actions and depedendabot configuration
Configure dependabot to report possible update for various actions that we use. Add two workflows: - update the flake dependencies once a week - deploy to fly.io when the main branch is updated
Diffstat (limited to '.github')
-rw-r--r--.github/dependabot.yml6
-rw-r--r--.github/workflows/deploy.yaml17
-rw-r--r--.github/workflows/update.yaml22
3 files changed, 45 insertions, 0 deletions
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
new file mode 100644
index 0000000..5ace460
--- /dev/null
+++ b/.github/dependabot.yml
@@ -0,0 +1,6 @@
+version: 2
+updates:
+ - package-ecosystem: "github-actions"
+ directory: "/"
+ schedule:
+ interval: "weekly"
diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml
new file mode 100644
index 0000000..b811c8e
--- /dev/null
+++ b/.github/workflows/deploy.yaml
@@ -0,0 +1,17 @@
+name: Deploy
+on:
+ push:
+ branches:
+ - main
+jobs:
+ production:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v3
+ - uses: cachix/install-nix-action@v17
+ with:
+ extra_nix_config: |
+ experimental-features = nix-command flakes
+ - run: nix --log-format raw -L run .#deploy
+ env:
+ FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
diff --git a/.github/workflows/update.yaml b/.github/workflows/update.yaml
new file mode 100644
index 0000000..a109c9f
--- /dev/null
+++ b/.github/workflows/update.yaml
@@ -0,0 +1,22 @@
+name: update-flake-lock
+on:
+ workflow_dispatch:
+ schedule:
+ - cron: '0 6 * * *'
+
+jobs:
+ update-flake-lock:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v3
+ - name: Install Nix
+ uses: cachix/install-nix-action@v17
+ with:
+ extra_nix_config: |
+ access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
+ - name: Update flake.lock
+ id: update-flake-lock
+ uses: DeterminateSystems/update-flake-lock@v14
+ with:
+ pr-title: "Update flake.lock"