Skip to content

Default to docker image v2.1.2 #3

Default to docker image v2.1.2

Default to docker image v2.1.2 #3

Workflow file for this run

name: Build & Push Image
on:
push:
tags:
- 'v*.*'
jobs:
build_and_push_image:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Get latest tag
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Print latest tag
run: |
echo $RELEASE_VERSION
echo ${{ env.RELEASE_VERSION }}
- name: Login to github registry
uses: actions-hub/docker/login@master
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
- name: Build :tag ${{ env.RELEASE_VERSION }}
if: success()
run: docker build -t ${{ secrets.DOCKER_USERNAME }}/get-keycloak-docs:${{ env.RELEASE_VERSION }} .
- name: Push to docker hub :tag ${{ env.RELEASE_VERSION }}
if: success()
uses: actions-hub/docker@master
with:
args: push ${{ secrets.DOCKER_USERNAME }}/get-keycloak-docs:${{ env.RELEASE_VERSION }}