about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2022-10-08 10:11:25 -0700
committerFranck Cuny <franck@fcuny.net>2022-10-08 10:11:46 -0700
commit4c1654af1d843b717656b14adf9a051f8f03870f (patch)
tree61b751c7f6209c18a67e0cd515f12dd35c290d8d
parentflake.lock: Update (diff)
downloadfcuny.net-4c1654af1d843b717656b14adf9a051f8f03870f.tar.gz
ci: update the actions for deploy and update
Don't trigger a deployment if we're updating one of the action, as
there are no changes to the application itself.

For the update workflow, run it once a week, and automatically merge it.
-rw-r--r--.github/workflows/deploy.yaml3
-rw-r--r--.github/workflows/update.yaml11
2 files changed, 13 insertions, 1 deletions
diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml
index b811c8e..843b15a 100644
--- a/.github/workflows/deploy.yaml
+++ b/.github/workflows/deploy.yaml
@@ -3,6 +3,9 @@ on:
   push:
     branches:
       - main
+    paths-ignore:
+      - '.github/**'
+
 jobs:
   production:
     runs-on: ubuntu-latest
diff --git a/.github/workflows/update.yaml b/.github/workflows/update.yaml
index a109c9f..e1f699a 100644
--- a/.github/workflows/update.yaml
+++ b/.github/workflows/update.yaml
@@ -2,7 +2,7 @@ name: update-flake-lock
 on:
   workflow_dispatch:
   schedule:
-    - cron: '0 6 * * *'
+    - cron: '30 5 * * 7'
 
 jobs:
   update-flake-lock:
@@ -20,3 +20,12 @@ jobs:
         uses: DeterminateSystems/update-flake-lock@v14
         with:
           pr-title: "Update flake.lock"
+          token: ${{ secrets.GH_TOKEN_FOR_UPDATES }}
+      - name: Enable pull request automerge
+        uses: peter-evans/enable-pull-request-automerge@v2
+        if: ${{ steps.update-flake-lock.outputs.pull-request-number }}
+        with:
+          token: ${{ secrets.GH_TOKEN_FOR_UPDATES }}
+          merge-method: rebase
+          pull-request-number: ${{ steps.update-flake-lock.outputs.pull-request-number }}
+