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-05-06 12:38:13 +00:00
|
|
|
|
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
|
2021-04-22 16:43:36 +00:00
|
|
|
- name: Set up QEMU
|
|
|
|
uses: docker/setup-qemu-action@v1
|
|
|
|
- name: Set up Docker Buildx
|
|
|
|
uses: docker/setup-buildx-action@v1
|
2021-04-21 01:13:37 +00:00
|
|
|
- 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
|
2021-04-23 07:29:24 +00:00
|
|
|
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
2021-04-21 01:13:37 +00:00
|
|
|
push: true
|
2021-05-10 04:23:17 +00:00
|
|
|
target: production
|
2021-04-21 01:13:37 +00:00
|
|
|
repository: inventree/inventree
|
|
|
|
tags: inventree/inventree:latest
|
|
|
|
- name: Image Digest
|
|
|
|
run: echo ${{ steps.docker_build.outputs.digest }}
|