44 push :
55 tags :
66 - " v*.*.*"
7+ pull_request :
8+ branches : ["main"]
9+ env :
10+ UV_VERSION : " 0.8.22"
11+ PYTHON_VERSION : " 3.10"
712
813jobs :
14+ build_and_test_package :
15+ uses : ./.github/workflows/build-test-python.yml
16+
17+ build_and_test_docker :
18+ uses : ./.github/workflows/build-test-docker.yml
19+
920 publish_to_pypi :
1021 name : Publish to PyPI
1122 runs-on : ubuntu-latest
12-
23+ needs : [build_and_test_package, build_and_test_docker]
1324 permissions :
1425 id-token : write
15- contents : read
16-
1726 steps :
1827 - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
1928
20- - name : Build package
21- uses : ./.github/actions/python-package-build
22- id : build
29+ - name : Download package artifacts
30+ uses : actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
31+ with :
32+ name : python-package-${{ github.sha }}
33+ path : dist
34+
35+ - name : Install uv
36+ uses : astral-sh/setup-uv@eac588ad8def6316056a12d4907a9d4d84ff7a3b # v7.3.0
2337 with :
24- uv-version : " 0.8.22"
25- python-version : " 3.10"
38+ version : ${{ env.UV_VERSION }}
2639
27- - name : Publish package
28- run : |
29- uv publish
40+ # - name: Publish package
41+ # run: |
42+ # uv publish
3043
3144 publish_to_dockerhub :
3245 name : Push Docker images to registries
3346 runs-on : ubuntu-latest
47+ needs : [build_and_test_docker, build_and_test_package]
3448 permissions :
3549 contents : read
3650 packages : write
5468 - name : Push Docker images
5569 uses : ./.github/actions/docker-build
5670 with :
57- push : " true"
71+ # push: "true"
5872 platforms : linux/amd64,linux/arm64
5973 dockerfile : ./Dockerfile
6074 context : .
@@ -63,21 +77,21 @@ jobs:
6377 type=registry,ref=ghcr.io/elementsinteractive/twyn:buildcache-amd64
6478 type=registry,ref=ghcr.io/elementsinteractive/twyn:buildcache-arm64
6579
66- - name : Delete old cache entries
67- env :
68- GH_TOKEN : ${{ github.token }}
69- run : |
70- # Get all versions of the container package
71- versions=$(gh api "orgs/elementsinteractive/packages/container/twyn/versions" --paginate)
80+ # - name: Delete old cache entries
81+ # env:
82+ # GH_TOKEN: ${{ github.token }}
83+ # run: |
84+ # # Get all versions of the container package
85+ # versions=$(gh api "orgs/elementsinteractive/packages/container/twyn/versions" --paginate)
7286
73- # Extract version IDs that do NOT have any buildcache-* tags (buildcache-amd64, buildcache-arm64, etc.)
74- ids_to_delete=$(echo "$versions" | jq -r '.[] | select(.metadata.container.tags | map(test("^buildcache-")) | any | not) | .id')
87+ # # Extract version IDs that do NOT have any buildcache-* tags (buildcache-amd64, buildcache-arm64, etc.)
88+ # ids_to_delete=$(echo "$versions" | jq -r '.[] | select(.metadata.container.tags | map(test("^buildcache-")) | any | not) | .id')
7589
76- # Delete them
77- for id in $ids_to_delete; do
78- echo "Deleting old cache version ID: $id"
79- gh api -X DELETE "orgs/elementsinteractive/packages/container/twyn/versions/$id"
80- done
90+ # # Delete them
91+ # for id in $ids_to_delete; do
92+ # echo "Deleting old cache version ID: $id"
93+ # gh api -X DELETE "orgs/elementsinteractive/packages/container/twyn/versions/$id"
94+ # done
8195
8296 release_notes :
8397 runs-on : ubuntu-latest
0 commit comments