-
Notifications
You must be signed in to change notification settings - Fork 1
99 lines (94 loc) · 2.47 KB
/
docker-image-push.yml
File metadata and controls
99 lines (94 loc) · 2.47 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
name: Docker Image CI
on:
release:
types: [published]
jobs:
build_pwr_studio_wheel:
runs-on: ubuntu-22.04
permissions:
contents: write
steps:
- name: Fetch PwR-Studio
uses: actions/checkout@v4
with:
repository: 'microsoft/PwR-Studio'
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install Poetry
run: |
pip install poetry
- name: Build package
run: |
cd lib
poetry install && poetry build
cd -
- name: Upload wheel as artifact
uses: actions/upload-artifact@v4
with:
name: pwr-studio-wheel
path: ./lib/dist/*.whl
retention-days: 3
overwrite: true
build_pwr_nl2dsl_wheel:
runs-on: ubuntu-22.04
permissions:
contents: write
steps:
- name: Fetch PwR-NL2DSL
uses: actions/checkout@v4
with:
repository: 'microsoft/PwR-NL2DSL'
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install Poetry
run: |
pip install poetry
- name: Build package
run: |
poetry install && poetry build
- name: Upload wheel as artifact
uses: actions/upload-artifact@v4
with:
name: nl2dsl-wheel
path: ./dist/*.whl
retention-days: 3
overwrite: true
build_docker_image:
runs-on: ubuntu-22.04
needs: [build_pwr_studio_wheel, build_pwr_nl2dsl_wheel]
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.merge_commit_sha }}
fetch-depth: '0'
# download earlier artifacts
- name: Download pwr-studio wheel
uses: actions/download-artifact@v4
with:
name: pwr-studio-wheel
path: ./dist/
- name: Download nl2dsl wheel
uses: actions/download-artifact@v4
with:
name: nl2dsl-wheel
path: ./dist/
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push Docker flow image
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
push: true
tags: |
opennyaiin/jugalbandi-studio-engine:latest
opennyaiin/jugalbandi-studio-engine:${{ github.ref_name }}