-
-
Notifications
You must be signed in to change notification settings - Fork 101
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move Docker build workflow to using the official Docker build actions (…
- Loading branch information
Showing
1 changed file
with
25 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|