-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaction.yml
More file actions
102 lines (81 loc) · 2.98 KB
/
action.yml
File metadata and controls
102 lines (81 loc) · 2.98 KB
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
name: 'Multi-Py Image Builder'
description: 'Build multiarchitecture builds of your favorite Python libraries.'
inputs:
python_version:
description: 'The Python version for this container.'
required: true
default: '3.10'
target_base:
description: 'The target version (slim, alpine, or full)'
required: true
default: 'full'
package:
description: 'The primary python package for the container.'
required: true
package_version:
description: 'The version to use in this container.'
required: true
package_latest_version:
description: 'The latest version of the package. When this matches `package_version` extra tags are added.'
required: false
image_name:
description: 'The name of the image (without the registry or tag).'
required: true
default: ${{ github.repository }}
platform:
description: 'The platform string to pass to buildx.'
required: true
default: "linux/amd64,linux/arm64,linux/arm/v7"
maintainer:
description: 'The maintainer, in `Name <email>` format.'
required: true
default: ${{ github.repository_owner }}
dockerfile:
description: "The path to the dockerfile to use while building."
required: true
default: ""
docker_build_path:
description: "The path to build the image from."
required: true
default: "."
registry:
description: "The registry to store the image in."
required: true
default: "ghcr.io"
registry_username:
description: "The username for logging into the registry. For the Github registry the repository owner is typically the username."
required: true
default: ${{ github.repository_owner }}
registry_password:
description: "The password for logging into the registry. For the Github registry the repository owner is typically `secret.GITHUB_TOKEN`."
required: true
runs:
using: "composite"
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
- name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ${{ inputs.registry }}
username: ${{ inputs.registry_username }}
password: ${{ inputs.registry_password }}
- name: Deploy Image
run: bash ${{ github.action_path }}/scripts/build_and_push.sh
shell: bash
env:
BUILDX_NAME: ${{ steps.buildx.outputs.name }}
BUILDX_ENDPOINT: ${{ steps.buildx.outputs.endpoint }}
DOCKERFILE_LOCATION: ${{ inputs.dockerfile }}
DOCKER_BUILD_PATH: ${{ inputs.docker_build_path }}
PYTHON_VERSION: ${{ inputs.python_version }}
TARGET_BASE: ${{ inputs.target_base }}
PACKAGE_LIST: ${{ inputs.package_list }}
PLATFORM: ${{ inputs.platform }}
PACKAGE: ${{ inputs.package }}
PACKAGE_VERSION: ${{ inputs.package_version }}
PACKAGE_LATEST_VERSION: ${{ inputs.package_latest_version }}
MAINTAINER: ${{ inputs.maintainer }}