]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
workflows: nix-flakestry: drop tag filters
authorSomeone Serge <redacted>
Sat, 30 Dec 2023 17:36:08 +0000 (17:36 +0000)
committerPhilip Taron <redacted>
Sun, 31 Dec 2023 21:14:58 +0000 (13:14 -0800)
...and add a job for flakehub.com

.github/workflows/nix-flakestry.yml [deleted file]
.github/workflows/nix-publish-flake.yml [new file with mode: 0644]

diff --git a/.github/workflows/nix-flakestry.yml b/.github/workflows/nix-flakestry.yml
deleted file mode 100644 (file)
index 3abfb35..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-# Make the flake discoverable on https://flakestry.dev
-name: "Publish a flake to flakestry"
-on:
-    push:
-        tags:
-        - "v?[0-9]+.[0-9]+.[0-9]+"
-        - "v?[0-9]+.[0-9]+"
-    workflow_dispatch:
-        inputs:
-            tag:
-                description: "The existing tag to publish"
-                type: "string"
-                required: true
-jobs:
-    publish-flake:
-        runs-on: ubuntu-latest
-        permissions:
-            id-token: "write"
-            contents: "read"
-        steps:
-            - uses: flakestry/flakestry-publish@main
-              with:
-                version: "${{ inputs.tag || github.ref_name }}"
diff --git a/.github/workflows/nix-publish-flake.yml b/.github/workflows/nix-publish-flake.yml
new file mode 100644 (file)
index 0000000..2c3c1eb
--- /dev/null
@@ -0,0 +1,36 @@
+# Make the flake discoverable on https://flakestry.dev and https://flakehub.com/flakes
+name: "Publish a flake to flakestry & flakehub"
+on:
+    push:
+        tags:
+        - "*"
+    workflow_dispatch:
+        inputs:
+            tag:
+                description: "The existing tag to publish"
+                type: "string"
+                required: true
+jobs:
+    flakestry-publish:
+        runs-on: ubuntu-latest
+        permissions:
+            id-token: "write"
+            contents: "read"
+        steps:
+            - uses: flakestry/flakestry-publish@main
+              with:
+                version: "${{ inputs.tag || github.ref_name }}"
+    flakehub-publish:
+      runs-on: "ubuntu-latest"
+      permissions:
+        id-token: "write"
+        contents: "read"
+      steps:
+        - uses: "actions/checkout@v4"
+          with:
+            ref: "${{ (inputs.tag != null) && format('refs/tags/{0}', inputs.tag) || '' }}"
+        - uses: "DeterminateSystems/nix-installer-action@main"
+        - uses: "DeterminateSystems/flakehub-push@main"
+          with:
+            visibility: "public"
+            tag: "${{ inputs.tag }}"