2021-10-07 11:00:03 +00:00
|
|
|
# Build and push docker image on push to 'stable' branch
|
|
|
|
# Docker build will be uploaded to dockerhub with the 'inventree:stable' tag
|
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:
|
2021-09-12 11:17:56 +00:00
|
|
|
- 'stable'
|
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-09-12 11:17:56 +00:00
|
|
|
- name: Check version number
|
|
|
|
run: |
|
|
|
|
python3 ci/check_version_number.py --release
|
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-09-12 11:17:56 +00:00
|
|
|
build-args:
|
2022-02-21 02:24:04 +00:00
|
|
|
branch=stable
|
2021-09-12 11:17:56 +00:00
|
|
|
tags: inventree/inventree:stable
|
2021-04-21 01:13:37 +00:00
|
|
|
- name: Image Digest
|
|
|
|
run: echo ${{ steps.docker_build.outputs.digest }}
|