dockers/grocy-docker/.github/workflows/build-docker.yml
Tyrel Souza a3479804d4 more
2023-01-26 21:03:03 +00:00

29 lines
793 B
YAML

name: Docker Image CI
on:
push:
tags:
- 'v*'
jobs:
build_and_push_latest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build docker-compose latest
run: GITHUB_API_TOKEN='${{ secrets.GITHUB_TOKEN }}' docker-compose build
- name: Push latest image
run: GITHUB_API_TOKEN='${{ secrets.GITHUB_TOKEN }}' docker-compose build
- name: Build docker-compose tag
run: GITHUB_API_TOKEN='${{ secrets.GITHUB_TOKEN }}' GROCY_IMAGE_TAG="$(git describe --abbrev=0 --tags)" docker-compose build
- name: Push tag
run: docker-compose push