Skip to content

Updated build version 2.2.13 to 2.3.0 #38

Updated build version 2.2.13 to 2.3.0

Updated build version 2.2.13 to 2.3.0 #38

name: Docker Build
on:
push:
branches:
- development
jobs:
docker-build-push:
runs-on: ubuntu-20.04
timeout-minutes: 40
steps:
- name: Check out the repo
uses: actions/checkout@v3
- name: Extract version from pom.xml
id: version
run: |
echo ::set-output name=VERSION::$(grep -A 1 '<artifactId>transformer</artifactId>' pom.xml | grep -oP '(?<=<version>).*?(?=</version>)')
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Log in to Docker Hub
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
username: ${{secrets.DOCKER_HUB_USERNAME}}
password: ${{secrets.DOCKER_HUB_ACCESS_TOKEN}}
- name: Build and push Docker image
uses: docker/build-push-action@v2
with:
context: "."
push: true
tags: samagragovernance/transformer:v${{ steps.version.outputs.VERSION }}-SNAPSHOT
build-args: |
username=${{ secrets.GH_USERNAME }},
token=${{ secrets.GH_TOKEN }}