2021-04-21 01:13:37 +00:00
|
|
|
# Build and push latest docker image on push to master branch
|
2021-03-31 11:45:42 +00:00
|
|
|
|
2021-04-21 01:13:37 +00:00
|
|
|
name: Docker Build
|
2021-03-31 11:45:42 +00:00
|
|
|
|
2021-04-21 01:13:37 +00:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- 'master'
|
2021-03-31 11:45:42 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
|
2021-04-10 12:48:23 +00:00
|
|
|
docker:
|
2021-03-31 11:48:58 +00:00
|
|
|
runs-on: ubuntu-latest
|
2021-03-31 11:45:42 +00:00
|
|
|
|
|
|
|
steps:
|
2021-04-21 01:13:37 +00:00
|
|
|
- name: Checkout Code
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Login to Dockerhub
|
|
|
|
uses: docker/login-action@v1
|
|
|
|
with:
|
|
|
|
username: ${{ secrets.DOCKER_USERNAME }}
|
|
|
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
|
|
- name: Build and Push
|
|
|
|
uses: docker/build-push-action@v2
|
|
|
|
with:
|
|
|
|
context: ./docker
|
|
|
|
push: true
|
|
|
|
repository: inventree/inventree
|
|
|
|
tags: inventree/inventree:latest
|
|
|
|
- name: Image Digest
|
|
|
|
run: echo ${{ steps.docker_build.outputs.digest }}
|