-
Notifications
You must be signed in to change notification settings - Fork 53
45 lines (41 loc) · 1.38 KB
/
docker_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
# Build and deploy a new docker image for Nuxeo Drive GNU/Linux binary builds
name: Docker build
on:
workflow_dispatch:
inputs:
pythonVersion:
description: "The Python version in-use for the current Nuxeo Drive version."
required: true
default: "x.y.z"
buildVersion:
description: "Image build number."
required: true
default: "0"
env:
REGISTRY: docker-private.packages.nuxeo.com
REPOSITORY: nuxeo-drive-build
jobs:
docker-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: docker/setup-buildx-action@v3.0.0
with:
driver: docker
- name: Login to the registry
uses: docker/login-action@v3.0.0
with:
registry: ${{ env.REGISTRY }}
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build the image
uses: docker/build-push-action@v5.1.0
with:
context: .
file: tools/linux/Dockerfile
build-args: |
VERSION=${{ github.event.inputs.buildVersion }}
SCM_REF=${{ env.GITHUB_SHA }}
tags: ${{ env.REGISTRY }}/${{ env.REPOSITORY }}:py-${{ github.event.inputs.pythonVersion }}
- name: Push the image
run: docker push ${{ env.REGISTRY }}/${{ env.REPOSITORY }}:py-${{ github.event.inputs.pythonVersion }}