@@ -14,28 +14,57 @@ concurrency:
14
14
cancel-in-progress : true
15
15
jobs :
16
16
build :
17
- if : github.repository == 'pypi/warehouse'
18
- runs-on : depot-ubuntu-24.04-arm
17
+ runs-on : ubuntu-24.04-arm
19
18
outputs :
20
- buildId : ${{ steps.build.outputs.build-id }}
19
+ buildId : ${{ github.run_id }}
21
20
permissions :
22
- id-token : write
21
+ packages : write
23
22
steps :
24
23
- name : Check out repository
25
24
uses : actions/checkout@v4
26
25
with :
27
26
persist-credentials : false
28
- - name : Set up Depot CLI
29
- uses : depot /setup-action@v1
30
- - name : Build image
31
- id : build
32
- uses : depot/build-push-action@v1
27
+ - name : Set up Docker Buildx
28
+ uses : docker /setup-buildx- action@v3 # zizmor: ignore[cache-poisoning]
29
+ - name : Cache
30
+ uses : actions/cache@v3 # zizmor: ignore[cache-poisoning]
31
+ id : cache
33
32
with :
34
- save : true
33
+ path : |
34
+ var-cache-apt
35
+ var-lib-apt
36
+ root-cache-pip
37
+ root-npm
38
+ key : cache-${{ hashFiles('Dockerfile') }}
39
+ - name : inject cache into docker
40
+ uses :
reproducible-containers/[email protected]
41
+ with :
42
+ cache-map : |
43
+ {
44
+ "var-cache-apt": "/var/cache/apt",
45
+ "var-lib-apt": "/var/lib/apt",
46
+ "root-cache-pip": "/root/.cache/pip",
47
+ "root-npm": "/root/.npm"
48
+ }
49
+ skip-extraction : ${{ steps.cache.outputs.cache-hit }}
50
+ - name : Login To GHCR
51
+ uses : docker/login-action@v3
52
+ with :
53
+ registry : ghcr.io
54
+ username : ${{ github.actor }}
55
+ password : ${{ secrets.GITHUB_TOKEN }}
56
+ - name : Build and push
57
+ uses : docker/build-push-action@v5
58
+ with :
59
+ context : .
60
+ cache-from : type=gha
61
+ cache-to : type=gha,mode=max
62
+ push : true
35
63
build-args : |
36
64
DEVEL=yes
37
65
CI=yes
38
- tags : pypi/warehouse:ci-${{ github.run_id }}
66
+ tags : |
67
+ ghcr.io/pypi/warehouse:ci-${{ github.run_id }}
39
68
test :
40
69
# Time out if our test suite has gotten hung
41
70
timeout-minutes : 15
@@ -59,13 +88,13 @@ jobs:
59
88
command : bin/licenses
60
89
- name : Translations
61
90
command : bin/translations
62
- runs-on : ${{ (matrix.runs_on != null) && matrix.runs_on || 'depot- ubuntu-24.04-arm' }}
91
+ runs-on : ubuntu-24.04-arm
63
92
container :
64
- image : registry.depot.dev/rltf7cln5v: ${{ needs.build.outputs.buildId }}
93
+ image : ghcr.io/pypi/warehouse:ci- ${{ needs.build.outputs.buildId }}
65
94
env :
66
95
BILLING_BACKEND : warehouse.subscriptions.services.MockStripeBillingService api_base=http://stripe:12111 api_version=2020-08-27
67
96
permissions :
68
- id-token : write
97
+ packages : read
69
98
services :
70
99
postgres :
71
100
image : ${{ (matrix.name == 'Tests') && 'postgres:16.1' || '' }}
@@ -103,12 +132,12 @@ jobs:
103
132
check_db :
104
133
name : Check Database Consistency
105
134
needs : build
106
- runs-on : depot- ubuntu-24.04-arm
135
+ runs-on : ubuntu-24.04-arm
107
136
continue-on-error : true
108
137
container :
109
- image : registry.depot.dev/rltf7cln5v: ${{ needs.build.outputs.buildId }}
138
+ image : ghcr.io/pypi/warehouse:ci- ${{ needs.build.outputs.buildId }}
110
139
permissions :
111
- id-token : write
140
+ packages : read
112
141
services :
113
142
postgres :
114
143
image : postgres:16.1
0 commit comments