Default to docker image v2.1.2 #3
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |