Skip to content

Only build docker when pushing to master branch #3

Only build docker when pushing to master branch

Only build docker when pushing to master branch #3

Workflow file for this run

name: Build Docker
on:
push:
branches:
- master
jobs:
buildx:
runs-on: "ubuntu-22.04"
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: "recursive"
# Add support for more platforms with QEMU (optional)
# https://github.com/docker/setup-qemu-action
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v4
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: |
ghcr.io/scoutred/mapnik:latest