about summary refs log tree commit diff
path: root/templates/go
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2023-12-15 08:13:26 -0800
committerFranck Cuny <franck@fcuny.net>2023-12-15 08:13:26 -0800
commit9f2310ed32e30a99fd32086d1b9a8bda5ca4af22 (patch)
treeec1fe8d61de235055edfbb20bd0a3a76effccdfd /templates/go
parentformat yaml (diff)
downloadworld-9f2310ed32e30a99fd32086d1b9a8bda5ca4af22.tar.gz
remove rust template, add GHA to go template
Diffstat (limited to 'templates/go')
-rw-r--r--templates/go/.github/dependabot.yml10
-rw-r--r--templates/go/.github/workflows/ci.yaml30
-rw-r--r--templates/go/.github/workflows/update.yml28
-rw-r--r--templates/go/go.mod4
4 files changed, 70 insertions, 2 deletions
diff --git a/templates/go/.github/dependabot.yml b/templates/go/.github/dependabot.yml
new file mode 100644
index 0000000..0cfc43c
--- /dev/null
+++ b/templates/go/.github/dependabot.yml
@@ -0,0 +1,10 @@
+version: 2
+updates:
+  - package-ecosystem: "github-actions"
+    directory: "/"
+    schedule:
+      interval: "weekly"
+  - package-ecosystem: "gomod"
+    directory: "/"
+    schedule:
+      interval: "weekly"
diff --git a/templates/go/.github/workflows/ci.yaml b/templates/go/.github/workflows/ci.yaml
new file mode 100644
index 0000000..72dbdc4
--- /dev/null
+++ b/templates/go/.github/workflows/ci.yaml
@@ -0,0 +1,30 @@
+name: "Build flake outputs"
+on:
+  push:
+    branches:
+      - main
+  pull_request:
+    branches:
+      - main
+    types:
+      - opened
+      - synchronize
+jobs:
+  build:
+    runs-on: ubuntu-latest
+    strategy:
+      fail-fast: false
+      matrix:
+        output:
+          - devShell.x86_64-linux
+    steps:
+      - uses: actions/checkout@v4
+        with:
+          fetch-depth: 0
+      - name: Install Nix
+        uses: cachix/install-nix-action@v24
+        with:
+          extra_nix_config: |
+            experimental-features = nix-command flakes
+      - run: nix flake check
+      - run: nix develop -c echo OK
diff --git a/templates/go/.github/workflows/update.yml b/templates/go/.github/workflows/update.yml
new file mode 100644
index 0000000..2723a6f
--- /dev/null
+++ b/templates/go/.github/workflows/update.yml
@@ -0,0 +1,28 @@
+name: 'Update flake.lock'
+on:
+  workflow_dispatch:
+  schedule:
+    - cron: '30 5 * * 0'
+# you need to grant permissions to create PR:
+# https://github.com/DeterminateSystems/update-flake-lock/issues/75
+jobs:
+  update-flake-lock:
+    runs-on: ubuntu-latest
+    steps:
+      - name: Checkout repository
+        uses: actions/checkout@v4
+      - name: Install Nix
+        uses: cachix/install-nix-action@v23
+        with:
+          extra_nix_config: |
+            access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
+      - name: Update flake.lock
+        id: update-flake-lock
+        uses: DeterminateSystems/update-flake-lock@v20
+        with:
+          pr-title: "Update flake.lock"
+          commit-msg: "chore: update flake"
+          pr-assignees: fcuny
+          pr-labels: |
+            dependencies
+            automated
diff --git a/templates/go/go.mod b/templates/go/go.mod
index 736d11c..aa1e0fb 100644
--- a/templates/go/go.mod
+++ b/templates/go/go.mod
@@ -1,3 +1,3 @@
-module go.fcuny.net/changeme
+module github.com/fcuny/changeme
 
-go 1.18
+go 1.21