mirror of https://github.com/Lissy93/dashy.git
30 lines
1.2 KiB
YAML
30 lines
1.2 KiB
YAML
name: Docker Build/Publish Image
|
|
on:
|
|
push:
|
|
branches: [ master ]
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-18.04
|
|
env:
|
|
DOCKER_IMAGE: kshfse/dashy
|
|
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
|
|
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
|
|
TARGETPLATFORM: linux/arm/v7
|
|
steps:
|
|
- name: Checkout the code
|
|
uses: actions/checkout@v1
|
|
- name: Set up Docker Buildx
|
|
uses: crazy-max/ghaction-docker-buildx@v1
|
|
with:
|
|
version: latest
|
|
- name: Docker Login
|
|
if: success()
|
|
run: |
|
|
echo "${DOCKER_PASSWORD}" | docker login --username "${DOCKER_USERNAME}" --password-stdin
|
|
- name: Run Buildx (push image)
|
|
if: success()
|
|
run: |
|
|
docker buildx build --platform linux/arm/v7 --tag kshfse/dashy:latest --build-arg TARGETPLATFORM=${TARGETPLATFORM} --file ./docker/Dockerfile-multi-arch --output type=image,push=true .
|
|
|
|
docker buildx build --platform linux/arm64 --tag kshfse/dashy:latest --build-arg TARGETPLATFORM=linux/arm64 --file ./docker/Dockerfile-multi-arch --output type=image,push=true .
|