-
Notifications
You must be signed in to change notification settings - Fork 4
59 lines (50 loc) · 1.73 KB
/
merge.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
59
name: Build, Push Docker Image, and Deploy Python Package
on:
push:
branches:
- main
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Create remote builder certificates
run: |
echo "${{ secrets.BUILDKIT_CA_PEM }}" > ${{ github.workspace }}/client-ca.pem
echo "${{ secrets.BUILDKIT_CERT_PEM }}" > ${{ github.workspace }}/client-cert.pem
echo "${{ secrets.BUILDKIT_KEY_PEM }}" > ${{ github.workspace }}/client-key.pem
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
driver: remote
endpoint: "tcp://buildkit.herodotus.dev:5000"
driver-opts: |
cacert=${{ github.workspace }}/client-ca.pem
cert=${{ github.workspace }}/client-cert.pem
key=${{ github.workspace }}/client-key.pem
cleanup: true
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
file: environment.dockerfile
tags: "dataprocessor/hdp-cairo:latest"
platforms: linux/amd64,linux/arm64
push: true
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.x"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build Python package
run: |
python setup.py sdist bdist_wheel
- name: Upload Python package to PyPI
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
twine upload dist/*