29 lines
793 B
YAML
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
|