From 98e8a4657a3a0f04fa3d2f31d506231045b4bc65 Mon Sep 17 00:00:00 2001
From: Dmitriy Safronov <zimniy@cyberbrain.pw>
Date: Mon, 6 May 2024 20:18:24 +0400
Subject: [PATCH] Workflow (#10)

Signed-off-by: Dmitriy Safronov <zimniy@cyberbrain.pw>
---
 .github/dependabot.yml                        | 20 ++++++++++++++++---
 .github/workflows/docker-publish.yml          |  8 +++++---
 .../rebase-on-push-to-main-branch.yaml        |  2 +-
 3 files changed, 23 insertions(+), 7 deletions(-)

diff --git a/.github/dependabot.yml b/.github/dependabot.yml
index 3a3cce5..731f8a8 100644
--- a/.github/dependabot.yml
+++ b/.github/dependabot.yml
@@ -5,7 +5,21 @@
 
 version: 2
 updates:
-  - package-ecosystem: "npm" # See documentation for possible values
-    directory: "/" # Location of package manifests
+  - package-ecosystem: "npm"
+    directory: "/"
     schedule:
-      interval: "weekly"
+      interval: "daily"
+    labels:
+      - "dependencies"
+  - package-ecosystem: "github-actions"
+    directory: "/"
+    schedule:
+      interval: "daily"
+    labels:
+      - "dependencies"
+  - package-ecosystem: "docker"
+    directory: "/"
+    schedule:
+      interval: "daily"
+    labels:
+      - "dependencies"
diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml
index ce8cfe4..addaab3 100644
--- a/.github/workflows/docker-publish.yml
+++ b/.github/workflows/docker-publish.yml
@@ -58,11 +58,13 @@ jobs:
           images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
           tags: |
             type=ref,event=branch
+            type=ref,event=branch,prefix=,suffix=-{{sha}}-{{date 'x'}}
             type=ref,event=pr
             type=semver,pattern={{version}}
-            type=semver,pattern={{major}}.{{minor}}
-            type=semver,pattern={{major}}
-            type=ref,event=branch,prefix=,suffix=-{{sha}}-{{date 'x'}}
+            type=semver,pattern={{major}}.{{minor}},enable=${{ !startsWith(github.ref, 'refs/tags/v0.0.') && !contains(github.ref, '-') }}
+            type=semver,pattern={{major}},enable=${{ !startsWith(github.ref, 'refs/tags/v0.') && !contains(github.ref, '-') }}
+          flavor: |
+            latest=${{ startsWith(github.ref, 'refs/tags/v') && !contains(github.ref, '-') }}
 
       # Cache dependencies
       # https://github.com/actions/cache
diff --git a/.github/workflows/rebase-on-push-to-main-branch.yaml b/.github/workflows/rebase-on-push-to-main-branch.yaml
index 38ced83..4c4d228 100644
--- a/.github/workflows/rebase-on-push-to-main-branch.yaml
+++ b/.github/workflows/rebase-on-push-to-main-branch.yaml
@@ -14,4 +14,4 @@ jobs:
           base: main
           exclude-drafts: true
           exclude-labels: |
-            no-rebase
+            dependencies
-- 
GitLab