Skip to content

Commit 03b2b99

Browse files
committed
Merge branch 'peeter/new-templates-for-union'
2 parents 26af761 + 26ee12a commit 03b2b99

File tree

27 files changed

+44
-105
lines changed

27 files changed

+44
-105
lines changed

.github/workflows/deployImage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- name: Check out repository
13-
uses: actions/checkout@v2
13+
uses: actions/checkout@v4
1414

1515
- name: Log in to GitHub Container Registry
1616
uses: docker/login-action@v1

.github/workflows/runIntegration.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,20 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- name: Check out repository
13-
uses: actions/checkout@v2
13+
uses: actions/checkout@v4
1414
with:
1515
fetch-depth: 0
1616
tags: true
1717
token: ${{ secrets.FLYTE_BOT_PAT }}
18-
18+
- uses: actions/setup-python@v5
19+
with:
20+
python-version: '3.11'
1921
- name: Log in to GitHub Container Registry
2022
uses: docker/login-action@v1
2123
with:
2224
registry: ghcr.io
2325
username: ${{ secrets.FLYTE_BOT_USERNAME }}
2426
password: ${{ secrets.FLYTE_BOT_PAT }}
25-
2627
- name: Iterate through top level directories and build Docker images
2728
env:
2829
ACCESS_TOKEN: ${{ secrets.FLYTE_BOT_PAT }}
@@ -73,7 +74,10 @@ jobs:
7374
runs-on: ubuntu-latest
7475
steps:
7576
- name: Check out repository
76-
uses: actions/checkout@v2
77+
uses: actions/checkout@v4
78+
- uses: actions/setup-python@v5
79+
with:
80+
python-version: '3.11'
7781
- name: Run integration tests
7882
env:
7983
host: ${{ secrets.FLYTE_HOST }}
@@ -86,4 +90,4 @@ jobs:
8690
--client_id $client_id \
8791
--client_secret $client_secret \
8892
--image_suffix pr-${{ github.event.pull_request.number }} \
89-
--image_hostname ghcr.io/${{ github.repository }}
93+
--image_hostname ghcr.io/${{ github.repository }}

basic-union-template/{{cookiecutter.project_name}}/workflows/workflows.py

Lines changed: 0 additions & 98 deletions
This file was deleted.
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
import union
2+
3+
image_spec = union.ImageSpec(
4+
5+
# The name of the image.
6+
name="hello-world-image",
7+
8+
# Use the `uv.lock` file in this project to define the dependencies included in the image.
9+
requirements="uv.lock",
10+
11+
# The container registry to which the image will be pushed.
12+
# Only used for Union BYOC. Not used for Union Serverless
13+
# Uncomment this parameter if you are using Union BYOC.:
14+
#
15+
# * Substitute the actual name of the registry for <my-registry>.
16+
# (for example if you are using GitHub's GHCR, you would use "ghcr.io/<my-github-org>").
17+
#
18+
# * Make sure you have Docker installed locally and are logged into that registry.
19+
#
20+
# * Make sure that the image, once pushed to the registry, is accessible to Union
21+
# (for example, for GHCR, make sure the image is public).
22+
#
23+
# registry="<my-registry>"
24+
)
25+
26+
@union.task(container_image=image_spec)
27+
def hello_world_task(name: str) -> str:
28+
return f"Hello, {name}!"
29+
30+
@union.workflow
31+
def hello_world_wf(name: str = "world") -> str:
32+
greeting = say_hello(name=name)
33+
return greeting
File renamed without changes.

first-project/{{cookiecutter.project_name}}/src/tasks/tasks.py renamed to union-standard/{{cookiecutter.project_name}}/src/tasks/tasks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
image_spec = union.ImageSpec(
66

77
# The name of the image.
8-
name="first-project-image",
8+
name="standard-image",
99

1010
# Use the `uv.lock` file in this project to define the dependencies included in the image.
1111
requirements="uv.lock",

0 commit comments

Comments
 (0)