-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (50 loc) · 1.48 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: Build
on:
workflow_dispatch:
push:
branches:
- main
tags:
- 'v*'
pull_request:
branches:
- main
jobs:
build-push:
name: manylinux1-static-libs
runs-on: ubuntu-20.04
permissions:
packages: write
env:
PLATFORM: x86_64
COMMIT_SHA: ${{ github.sha }}
steps:
- uses: actions/checkout@v2
- name: Prefetch tarballs
# Tarballs are prefetched outside the container since CentOS 5 has very old tools
run: |
docker/build_scripts/prefetch.sh perl openssl curl cacert
# Setup tags to be used for docker images
- uses: docker/metadata-action@v3
id: docker_meta
with:
images: ghcr.io/${{ github.repository_owner }}/manylinux1-static-libs
# Login to Github Packages
- name: Log in to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
# Build and eventually push to registry
- name: Build and deploy
uses: docker/build-push-action@v2
with:
context: ./docker
file: ./docker/Dockerfile-x86_64
platforms: linux/amd64
push: ${{ github.event_name == 'push' }}
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}