Skip to content

#67 gh action to build demo image #4

#67 gh action to build demo image

#67 gh action to build demo image #4

Workflow file for this run

name: build docker demo image
on:
push:
branches:
- feature/gh-docker-build
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Prepare build-args
id: build-args
run: |
echo BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` >> $GITHUB_OUTPUT
echo VCS_REF=`git rev-parse --short HEAD` >> $GITHUB_OUTPUT
echo VERSION=`python -c 'from __future__ import print_function; import business_logic; print(business_logic.__version__)'` >> $GITHUB_OUTPUT
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
build-args: |
VCS_REF=${{ steps.build-args.outputs.VCS_REF }}
BUILD_DATE=${{ steps.build-args.outputs.BUILD_DATE }}
VERSION=${{ steps.build-args.outputs.VERSION }}
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: dgksu/django-business-logic:demox