ci: change Docker workflow to run twice a month and on tag pushes

Change-Id: Id3528e537be00fc7d24cb0e4d7868862343bb6e5
diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml
index f344276..72eaefd 100644
--- a/.github/workflows/docker.yml
+++ b/.github/workflows/docker.yml
@@ -1,15 +1,11 @@
 name: Docker
 on:
   push:
-    branches:
-      - master
-    paths-ignore:
-      - '.editorconfig'
-      - 'examples/**'
-      - '.jenkins'
-      - '.jenkins.d/**'
-      - '.mailmap'
-      - 'tests/**'
+    tags:
+      - 'ndn-cxx-*'
+  schedule:
+    # twice a month
+    - cron: '20 4 5,20 * *'
   workflow_dispatch:
 
 permissions:
diff --git a/Dockerfile b/Dockerfile
index 9d73d0b..14a5c65 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -21,6 +21,7 @@
     # use 'apt-get distclean' when we upgrade to ubuntu:24.04
     && rm -rf /var/lib/apt/lists/*
 
+ARG JOBS
 RUN --mount=type=bind,rw,target=/src <<EOF
 set -eux
 cd /src