Skip to content

Commit

Permalink
Move Docker build workflow to using the official Docker build actions (
Browse files Browse the repository at this point in the history
  • Loading branch information
fpiesche authored Dec 25, 2020
1 parent 19e945b commit 009c6b0
Showing 1 changed file with 25 additions and 11 deletions.
36 changes: 25 additions & 11 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,39 @@
name: Build & Push Docker image

on:
push:
branches:
- master
paths:
- 'APPVERSION'
# Allow manual runs.
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: checkout code
uses: actions/checkout@v2
- name: install buildx
id: buildx
uses: crazy-max/ghaction-docker-buildx@v1

- name: Setup QEMU
uses: docker/[email protected]

- name: Setup Buildx
uses: docker/[email protected]

- name: Login to Docker Hub
uses: docker/login-action@v1
with:
version: latest
- name: login to docker hub
run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USER }}" --password-stdin
- name: build image
run: |
docker buildx build - push \
--tag moncho/dry:latest \
--platform linux/amd64,linux/arm/v7,linux/arm64 .
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push Docker image
uses: docker/[email protected]
with:
context: .
file: ./Dockerfile
tags: moncho/dry:latest
platforms: linux/arm/v6,linux/arm/v7,linux/arm64/v8,linux/amd64
push: true

0 comments on commit 009c6b0

Please sign in to comment.