Skip to content
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.

build newer image

build newer image #35

Workflow file for this run

name: Build
on:
workflow_dispatch:
inputs:
useCache:
description: Use GHA cache
type: boolean
required: false
default: true
push:
branches:
- "valhalla_python"
- "osrm_python"
- "valhalla_python_update"
paths-ignore:
- "*.md"
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
jobs:
build_manylinux:
name: manylinux_2_28_x86_64
runs-on: ubuntu-22.04
env:
POLICY: manylinux_2_28
PLATFORM: x86_64
COMMIT_SHA: ${{ github.sha }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Setup cache
if: github.event_name != 'workflow_dispatch' || fromJSON(github.event.inputs.useCache)
uses: actions/cache@v3
with:
path: .buildx-cache-manylinux_2_28_x86_64/
key: buildx-cache-manylinux_2_28_x86_64-${{ hashFiles('docker/**') }}
restore-keys: buildx-cache-manylinux_2_28_x86_64-
- name: Get branch name
run: |
echo "BRANCH=${GITHUB_REF##*/}" >> $GITHUB_ENV
- name: Build image
run: ./build.sh
- name: Push image
run: |
docker tag quay.io/pypa/manylinux_2_28_x86_64:${{ github.sha }} ghcr.io/gis-ops/manylinux:2_28_${{ env.BRANCH }}
docker image rm quay.io/pypa/manylinux_2_28_x86_64:${{ github.sha }}
echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin
docker push ghcr.io/gis-ops/manylinux:2_28_${{ env.BRANCH }}