Skip to content

Commit 0325aff

Browse files
committed
Build docker image when a tag is pushed
1 parent 8ec0889 commit 0325aff

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed
+4-10
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,16 @@
11
name: build and push image to dockerhub
22
on:
33
push:
4-
branches:
5-
- ona-custom-changes
6-
workflow_dispatch:
7-
inputs:
8-
versionTag:
9-
description: "Version Tag"
10-
required: true
11-
default: ""
4+
tags:
5+
- '[0-9]+\.[0-9]+\.[0-9]+'
126
jobs:
137
main:
148
runs-on: ubuntu-22.04
159
steps:
1610
- name: Checkout to version
1711
uses: actions/checkout@v3
1812
with:
19-
ref: ${{ github.event.inputs.versionTag || '0.0.4' }}
13+
ref: ${{ GITHUB_REF_NAME#refs/heads }}
2014

2115
- name: Login to DockerHub
2216
uses: docker/login-action@v2
@@ -32,7 +26,7 @@ jobs:
3226
file: Dockerfile
3327
platforms: linux/amd64
3428
tags: |
35-
onaio/dirt-tile-server:${{ github.event.inputs.versionTag || '0.0.4' }}
29+
onaio/dirt-tile-server:${{ GITHUB_REF_NAME#refs/heads }}
3630
3731
- name: Image digest
3832
run: echo ${{ steps.docker-build.outputs.digest }}

0 commit comments

Comments
 (0)