Skip to content

build

build #6

Workflow file for this run

name: build
on:
release:
types: [published,edited]
workflow_dispatch:
jobs:
buildx:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Docker meta
uses: docker/metadata-action@v4
id: meta
with:
images: ${{ secrets.DOCKERHUB_USERNAME }}/google-location
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and Push
uses: docker/build-push-action@v4
with:
push: true
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64,linux/arm/v7,linux/arm/v6,linux/arm64
tags: ${{ steps.meta.outputs.tags }}
cache-from: type=registry,ref=${{ secrets.DOCKERHUB_USERNAME }}/google-location:buildcache
cache-to: type=registry,ref=${{ secrets.DOCKERHUB_USERNAME }}/google-location:buildcache,mode=max