-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (57 loc) · 1.66 KB
/
build-python.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
60
61
62
name: Build python
on:
push:
branches:
- main
paths:
- 'python/**'
pull_request:
paths:
- 'python/**'
workflow_dispatch:
inputs:
publish:
description: 'Publish to Packagecloud?'
required: false
type: boolean
default: false
container:
description: 'Publish container?'
required: false
type: boolean
default: false
container_tag:
description: 'Tag for container'
required: false
type: string
jobs:
build:
uses: ./.github/workflows/build-packages.yml
with:
make: python
platforms: linux/amd64
secrets:
BUILD_WEBHOOK_URL: ${{ secrets.BUILDS_WEBHOOK_URL }}
REGISTRY_USERNAME: ${{ secrets.REGISTRY_USERNAME }}
REGISTRY_TOKEN: ${{ secrets.REGISTRY_TOKEN }}
publish:
if: (github.event_name == 'push') || (github.event.inputs.publish == 'true')
uses: ./.github/workflows/publish-packages.yml
needs: build
secrets:
BUILD_WEBHOOK_URL: ${{ secrets.BUILDS_WEBHOOK_URL }}
PACKAGECLOUD_TOKEN: ${{ secrets.PACKAGECLOUD_TOKEN }}
container:
if: (github.event_name == 'push') || (github.event.inputs.container == 'true')
needs: build
uses: ./.github/workflows/publish-container.yml
with:
path: python
container_name: caketop/python-build
container_tag: ${{ github.event.inputs.container_tag }}
buildx_args: --target python_dev
platforms: linux/amd64,linux/arm64
secrets:
BUILD_WEBHOOK_URL: ${{ secrets.BUILDS_WEBHOOK_URL }}
REGISTRY_USERNAME: ${{ secrets.REGISTRY_USERNAME }}
REGISTRY_TOKEN: ${{ secrets.REGISTRY_TOKEN }}