Skip to content

Docker build

Docker build #167

Workflow file for this run

name: Docker build
on:
push:
branches:
- main
schedule:
- cron: "30 10 * * *"
jobs:
russia-all:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Make dir
run: mkdir -p custom_files
- name: Dowload data file
run: wget https://download.geofabrik.de/russia-latest.osm.pbf -O custom_files/russia-latest.osm.pbf
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v2
with:
context: .
file: Dockerfile
platforms: linux/amd64
push: true
build-args: OSM_FILE=russia-latest.osm.pbf
tags: ghcr.io/deemakuzovkin/osm-docker/russia-all:latest
russia:
runs-on: ubuntu-latest
strategy:
matrix:
params:
- central-fed-district-latest.osm.pbf/central-fed-district
- crimean-fed-district-latest.osm.pbf/crimea
- far-eastern-fed-district-latest.osm.pbf/far-eastern-fed-district
- north-caucasus-fed-district-latest.osm.pbf/north-caucasus-fed-district
- northwestern-fed-district-latest.osm.pbf/northwestern-fed-district
- siberian-fed-district-latest.osm.pbf/siberian-fed-district
- south-fed-district-latest.osm.pbf/south-fed-district
- ural-fed-district-latest.osm.pbf/ural-fed-district
- volga-fed-district-latest.osm.pbf/volga-fed-district
- kaliningrad-latest.osm.pbf/kaliningrad
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Get env from matrix
run: |
MATRIX=${{matrix.params}}
MATRIX_FILE=${MATRIX%/*}
MATRIX_TAG=${MATRIX#*/}
echo "MATRIX_FILE=$MATRIX_FILE" >> $GITHUB_ENV
echo "MATRIX_TAG=$MATRIX_TAG" >> $GITHUB_ENV
- name: Make dir
run: mkdir -p custom_files
- name: Dowload data file
run: wget https://download.geofabrik.de/${{ github.job }}/$MATRIX_FILE -O custom_files/$MATRIX_FILE
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v2
with:
context: .
file: Dockerfile
platforms: linux/amd64
push: true
build-args: OSM_FILE=${{ env.MATRIX_FILE }}
tags: ghcr.io/deemakuzovkin/osm-docker/${{ env.MATRIX_TAG }}:latest