ConfigurableInlineTelegramBot/.github/workflows/build_and_publish_docker.yml

29 lines
795 B
YAML
Raw Normal View History

2021-03-06 16:56:00 +00:00
name: Publish Docker image
2021-03-06 16:57:31 +00:00
on: [push]
2021-03-06 16:56:00 +00:00
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
- uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Build
run: ./gradlew build
- name: Docker meta
id: docker_meta
uses: crazy-max/ghaction-docker-meta@v1
with:
2021-03-06 17:21:27 +00:00
images: name/app
2021-03-06 16:56:00 +00:00
tag-sha: true
tag-latest: false
- name: Push to Docker Hub
uses: docker/build-push-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
2021-03-06 17:16:00 +00:00
context: .
2021-03-06 16:56:00 +00:00
tags: ${{ steps.docker_meta.outputs.tags }}