Skip to content

Merge pull request #767 from thorrak/master #29

Merge pull request #767 from thorrak/master

Merge pull request #767 from thorrak/master #29

name: 'Build & Push to Docker Hub (dev)'
on:
push:
branches:
- dev
jobs:
buildx:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/[email protected]
-
name: Set up QEMU
uses: docker/[email protected]
with:
platforms: all
-
name: Dockerhub login
env:
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
run: |
echo "${DOCKER_PASSWORD}" | docker login --username ${DOCKER_USERNAME} --password-stdin
-
name: Set up Docker Buildx
id: buildx
uses: docker/[email protected]
with:
version: latest
-
name: Log in to GitHub Packages
run: echo ${{ secrets.GH_TOKEN }} | docker login ghcr.io -u ${{ secrets.GH_USER }} --password-stdin
-
name: Pull Fermentrack Image
run: docker pull jdbeeler/fermentrack:docker-dev
-
name: Build dockerfile (arm32v7/amd64/arm64v8/i386)
run: |
docker buildx build \
--platform=linux/arm/v7,linux/amd64,linux/i386,linux/arm64/v8 \
--output "type=image,push=true" \
--file ./compose/production/django/Dockerfile . \
--tag jdbeeler/fermentrack:docker-dev \
--cache-from ghcr.io/thorrak/fermentrack:docker-dev \
--cache-to ghcr.io/thorrak/fermentrack:docker-dev