-
Notifications
You must be signed in to change notification settings - Fork 2.2k
40 lines (36 loc) · 920 Bytes
/
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
name: Build Docker Images
on:
workflow_dispatch:
inputs:
onmt_version:
description: "OpenNMT version"
required: true
type: string
# to facilitate initial tests in PR
push:
branches:
- "docker"
run-name: ${{ format('{0}:{1}', github.workflow, inputs.onmt_version) }}
env:
ONMT_VERSION: ${{ inputs.onmt_version || 'test' }}
jobs:
build:
runs-on: ubuntu-22.04
strategy:
matrix:
cuda_version: [11.8.0, 12.1.0]
permissions:
id-token: write
contents: read
steps:
- name: Checkout opennmt repo
uses: actions/checkout@v4
- name: Login to ghcr
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build
run: |
docker/build.sh ${{ env.ONMT_VERSION }} ${{ matrix.cuda_version}}