diff --git a/.github/workflows/docker-image-build.yaml b/.github/workflows/docker-image-build.yaml index 4956286..d60a8e0 100644 --- a/.github/workflows/docker-image-build.yaml +++ b/.github/workflows/docker-image-build.yaml @@ -1,14 +1,8 @@ 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 @@ -16,7 +10,7 @@ jobs: - 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 @@ -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 }}