Skip to content

Commit

Permalink
Build docker image when a tag is pushed
Browse files Browse the repository at this point in the history
  • Loading branch information
FrankApiyo committed Dec 14, 2022
1 parent 8ec0889 commit 0325aff
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions .github/workflows/docker-image-build.yaml
Original file line number Diff line number Diff line change
@@ -1,22 +1,16 @@
name: build and push image to dockerhub
on:
push:
branches:
- ona-custom-changes
workflow_dispatch:
inputs:
versionTag:
description: "Version Tag"
required: true
default: ""
tags:
- '[0-9]+\.[0-9]+\.[0-9]+'
jobs:
main:
runs-on: ubuntu-22.04
steps:
- name: Checkout to version
uses: actions/checkout@v3
with:
ref: ${{ github.event.inputs.versionTag || '0.0.4' }}
ref: ${{ GITHUB_REF_NAME#refs/heads }}

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

0 comments on commit 0325aff

Please sign in to comment.