InvenTree/.github/workflows/docker_stable.yaml

43 lines
1.1 KiB
YAML
Raw Normal View History

# 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:
- '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
- 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
target: production
build-args:
branch=stable
tags: inventree/inventree:stable
2021-04-21 01:13:37 +00:00
- name: Image Digest
run: echo ${{ steps.docker_build.outputs.digest }}