Skip to content

Workflow file for this run

name: Publish Leek Docker image
on:
release:
types: [published]
jobs:
push_to_registry:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Get current date
id: date
run: echo "::set-output name=date::$(date -u +'%Y/%m/%d %H:%M:%S')"
- name: Build and Push to Docker Hub
uses: docker/build-push-action@v2
with:
context: app
file: app/dockers/Dockerfile
push: true
build-args: |
LEEK_VERSION=${{ github.event.release.tag_name }}
LEEK_RELEASE_DATE=${{ steps.date.outputs.date }}
tags: |
kodhive/leek:latest
kodhive/leek:${{ github.event.release.tag_name }}
cache-from: type=registry,ref=kodhive/leek:cache
cache-to: type=registry,ref=kodhive/leek:cache