This repository has been archived by the owner on Oct 15, 2024. It is now read-only.
Offload all osrm-backend building to here #26
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
useCache: | ||
description: Use GHA cache | ||
type: boolean | ||
required: false | ||
default: true | ||
push: | ||
branches: | ||
- "osrm_python" | ||
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@v3 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
- 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 | ||
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 }} | ||
all_passed: | ||
needs: [build_manylinux] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- run: echo "All jobs passed" |