Browse Source

Docker CI - Update actions (#460)

* Update docker-image.yaml

* Update docker-image.yaml

* Update docker-image.yaml

* Update docker-image.yaml

* Update docker-image.yaml

* Create Docker on Tag and push on main
Ben Hählen 11 months ago
parent
commit
6ef283d7ef
1 changed files with 8 additions and 19 deletions
  1. 8 19
      .github/workflows/docker-image.yaml

+ 8 - 19
.github/workflows/docker-image.yaml

@@ -4,22 +4,11 @@ name: Docker Image CI
 # Configures this workflow to run every time a change is pushed to the
 # branch called `main`.
 on:
-  workflow_dispatch:
-    inputs:
-      version:
-        description: 'Version WITHOUT leading "v"'
-        required: true
-      major:
-        description: 'Major version component (redundant, but needed)'
-        required: true
-      minor:
-        description: 'Minor version component (redundant, but needed)'
-        required: true
-  # push:
-    # tags:
-    #   - '*.*.*'
-    # branches:
-    #   - 'release'
+  push:
+    tags:
+      - '*.*.*'
+    branches:
+      - 'main'
 
 # Defines two custom environment variables for the workflow. These are used
 # for the Container registry domain, and a name for the Docker image that
@@ -58,7 +47,7 @@ jobs:
         uses: docker/setup-qemu-action@v3
 
       - name: Set up Docker Buildx
-        uses: docker/setup-buildx-action@v2
+        uses: docker/setup-buildx-action@v3
 
       # This step uses [docker/metadata-action](https://github.com/docker/metadata-action#about)
       # to extract tags and labels that will be applied to the specified image.
@@ -71,8 +60,8 @@ jobs:
         with:
           images: "${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}"
           tags: |
-            type=semver,pattern=${{github.event.inputs.version}}
-            type=semver,pattern=${{github.event.inputs.major}}.${{github.event.inputs.minor}}
+            type=semver,pattern={{version}}
+            type=ref,event=branch
 
       # This step uses the `docker/build-push-action` action to build the
       # image, based on your repository's `Dockerfile`. If the build succeeds,