Skip to content

Commit 839dd31

Browse files
committed
run our docker ci on gha runners directly
1 parent 9c356d3 commit 839dd31

File tree

1 file changed

+46
-16
lines changed

1 file changed

+46
-16
lines changed

.github/workflows/ci.yml

Lines changed: 46 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -15,27 +15,57 @@ concurrency:
1515
jobs:
1616
build:
1717
if: github.repository == 'pypi/warehouse'
18-
runs-on: depot-ubuntu-24.04-arm
18+
runs-on: ubuntu-24.04-arm
1919
outputs:
20-
buildId: ${{ steps.build.outputs.build-id}}
20+
buildId: ${{ github.run_id }}
2121
permissions:
22-
id-token: write
22+
packages: write
2323
steps:
2424
- name: Check out repository
2525
uses: actions/checkout@v4
2626
with:
2727
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
28+
- name: Set up Docker Buildx
29+
uses: docker/setup-buildx-action@v3
30+
- name: Cache
31+
uses: actions/cache@v3
32+
id: cache
3333
with:
34-
save: true
34+
path: |
35+
var-cache-apt
36+
var-lib-apt
37+
root-cache-pip
38+
root-npm
39+
key: cache-${{ hashFiles('Dockerfile') }}
40+
- name: inject cache into docker
41+
uses: reproducible-containers/[email protected]
42+
with:
43+
cache-map: |
44+
{
45+
"var-cache-apt": "/var/cache/apt",
46+
"var-lib-apt": "/var/lib/apt",
47+
"root-cache-pip": "/root/.cache/pip",
48+
"root-npm": "/root/.npm"
49+
}
50+
skip-extraction: ${{ steps.cache.outputs.cache-hit }}
51+
- name: Login To GHCR
52+
uses: docker/login-action@v3
53+
with:
54+
registry: ghcr.io
55+
username: ${{ github.actor }}
56+
password: ${{ secrets.GITHUB_TOKEN }}
57+
- name: Build and push
58+
uses: docker/build-push-action@v5
59+
with:
60+
context: .
61+
cache-from: type=gha
62+
cache-to: type=gha,mode=max
63+
push: true
3564
build-args: |
3665
DEVEL=yes
3766
CI=yes
38-
tags: pypi/warehouse:ci-${{ github.run_id }}
67+
tags: |
68+
ghcr.io/pypi/warehouse:ci-${{ github.run_id }}
3969
test:
4070
# Time out if our test suite has gotten hung
4171
timeout-minutes: 15
@@ -57,13 +87,13 @@ jobs:
5787
command: bin/licenses
5888
- name: Translations
5989
command: bin/translations
60-
runs-on: depot-ubuntu-24.04-arm-4
90+
runs-on: ubuntu-24.04-arm
6191
container:
62-
image: registry.depot.dev/rltf7cln5v:${{ needs.build.outputs.buildId }}
92+
image: ghcr.io/pypi/warehouse:ci-${{ needs.build.outputs.buildId }}
6393
env:
6494
BILLING_BACKEND: warehouse.subscriptions.services.MockStripeBillingService api_base=http://stripe:12111 api_version=2020-08-27
6595
permissions:
66-
id-token: write
96+
packages: read
6797
services:
6898
postgres:
6999
image: ${{ (matrix.name == 'Tests') && 'postgres:16.1' || '' }}
@@ -101,12 +131,12 @@ jobs:
101131
check_db:
102132
name: Check Database Consistency
103133
needs: build
104-
runs-on: depot-ubuntu-24.04-arm
134+
runs-on: ubuntu-24.04-arm
105135
continue-on-error: true
106136
container:
107-
image: registry.depot.dev/rltf7cln5v:${{ needs.build.outputs.buildId }}
137+
image: ghcr.io/pypi/warehouse:ci-${{ needs.build.outputs.buildId }}
108138
permissions:
109-
id-token: write
139+
packages: read
110140
services:
111141
postgres:
112142
image: postgres:16.1

0 commit comments

Comments
 (0)