Skip to content

V5.0.1 - Love Train #57

V5.0.1 - Love Train

V5.0.1 - Love Train #57

Workflow file for this run

name: lthn/chain:latest
on:
push:
branches:
- 'v*'
tags:
- 'v*'
paths-ignore:
- '**.md'
pull_request:
branches:
- 'v*'
paths-ignore:
- '**.md'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: docker/setup-buildx-action@v1
id: buildx
with:
install: true
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Get the version
id: get_version
if: startsWith(github.ref, 'refs/tags/')
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
- name: Build and push
id: docker_build
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v2
with:
push: true
tags: lthn/chain:latest,lthn/chain:${{ steps.get_version.outputs.VERSION }}
- name: Build and push
id: docker_builds
if: startsWith(github.ref, 'refs/tags/') == false
uses: docker/build-push-action@v2
with:
push: true
tags: lthn/chain:next