-
Notifications
You must be signed in to change notification settings - Fork 61
48 lines (46 loc) · 1.44 KB
/
docker-hub-docker-dev.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
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