Skip to content

Commit c17986e

Browse files
authored
[manylinux2010] Build on GHA (#988)
1 parent 4117e7c commit c17986e

File tree

5 files changed

+52
-45
lines changed

5 files changed

+52
-45
lines changed

.github/workflows/build.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches-ignore:
6+
- "dependabot/**"
7+
paths:
8+
- ".github/workflows/build.yml"
9+
- "docker/**"
10+
- "*.sh"
11+
pull_request:
12+
paths:
13+
- ".github/workflows/build.yml"
14+
- "docker/**"
15+
- "build.sh"
16+
17+
jobs:
18+
build:
19+
name: manylinux2010_${{ matrix.platform }}
20+
runs-on: ubuntu-20.04
21+
strategy:
22+
fail-fast: false
23+
matrix:
24+
include:
25+
- platform: "i686"
26+
- platform: "x86_64"
27+
28+
env:
29+
PLATFORM: ${{ matrix.platform }}
30+
COMMIT_SHA: ${{ github.sha }}
31+
32+
steps:
33+
- name: Checkout
34+
uses: actions/checkout@v2
35+
- name: Build
36+
run: ./build.sh
37+
- name: Deploy
38+
if: github.event_name == 'push' && github.ref == 'refs/heads/master' && github.repository == 'pypa/manylinux'
39+
run: ./deploy.sh
40+
env:
41+
QUAY_USERNAME: ${{ secrets.QUAY_USERNAME }}
42+
QUAY_PASSWORD: ${{ secrets.QUAY_PASSWORD }}

.travis.yml

Lines changed: 0 additions & 35 deletions
This file was deleted.

build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
set -ex
55

66

7-
docker build --rm -t "quay.io/pypa/manylinux2010_$PLATFORM:$TRAVIS_COMMIT" -f "docker/Dockerfile-$PLATFORM" docker/
7+
docker build --rm -t "quay.io/pypa/manylinux2010_${PLATFORM}:${COMMIT_SHA}" -f "docker/Dockerfile-${PLATFORM}" docker/

deploy.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/bash
2+
tag="quay.io/pypa/manylinux2010_$PLATFORM"
3+
build_id=$(git show -s --format=%cd-%h --date=short ${COMMIT_SHA})
4+
5+
docker login -u $QUAY_USERNAME -p $QUAY_PASSWORD quay.io
6+
docker tag ${tag}:${COMMIT_SHA} ${tag}:${build_id}
7+
docker tag ${tag}:${COMMIT_SHA} ${tag}:latest
8+
docker push ${tag}:${build_id}
9+
docker push ${tag}:latest

docker/deploy.sh

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)