Skip to content

Commit 986842a

Browse files
committed
fix: workflow
1 parent 75582e6 commit 986842a

1 file changed

Lines changed: 24 additions & 14 deletions

File tree

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Main
1+
name: isOdoo
22

33
on:
44
pull_request:
@@ -15,17 +15,16 @@ jobs:
1515
PYTHONUNBUFFERED: 1
1616

1717
steps:
18-
- uses: actions/checkout@v4
19-
with:
20-
fetch-depth: 0
21-
- name: Switch to current branch
22-
run: git checkout ${{ env.BRANCH }}
18+
- uses: actions/checkout@v6
19+
2320
- name: "Set up Python"
2421
uses: actions/setup-python@v6
2522
with:
2623
python-version-file: "pyproject.toml"
24+
2725
- name: Install uv
2826
uses: astral-sh/setup-uv@v7
27+
2928
- name: Restore pre-commit cache
3029
uses: actions/cache@v5
3130
with:
@@ -36,6 +35,7 @@ jobs:
3635
pre-commit-${{ runner.os }}-${{ hashFiles('uv.lock') }}
3736
pre-commit-${{ runner.os }}-${{ hashFiles('.pre-commit-config.yaml') }}
3837
pre-commit-${{ runner.os }}
38+
3939
- name: Install the project
4040
run: uv sync --locked --all-extras --dev
4141
- uses: pre-commit/action@v3.0.1
@@ -53,29 +53,31 @@ jobs:
5353
PYTHONUNBUFFERED: 1
5454

5555
steps:
56-
- uses: actions/checkout@v4
57-
with:
58-
fetch-depth: 0
59-
- name: Switch to current branch
60-
run: git checkout ${{ env.BRANCH }}
56+
- uses: actions/checkout@v6
57+
6158
- name: "Set up Python"
6259
uses: actions/setup-python@v6
6360
with:
6461
python-version-file: "pyproject.toml"
62+
6563
- name: Install uv
6664
uses: astral-sh/setup-uv@v7
65+
6766
- name: Restore uv cache
6867
uses: actions/cache@v5
6968
with:
70-
path: /tmp/.uv-cache
69+
path: ~/.cache/uv
7170
key: uv-${{ runner.os }}-${{ hashFiles('uv.lock') }}
7271
restore-keys: |
7372
uv-${{ runner.os }}-${{ hashFiles('uv.lock') }}
7473
uv-${{ runner.os }}
74+
7575
- name: Install the project
7676
run: uv sync --locked --all-extras --dev
77+
7778
- name: Run pytest
7879
run: uv run pytest --odoo-version ${{ matrix.odoo_version }} --no-cache -v
80+
7981
- name: Minimize uv cache
8082
run: uv cache prune --ci
8183

@@ -117,6 +119,13 @@ jobs:
117119
org.opencontainers.image.vendor=GrupoIsonor
118120
odoo.version=${{ matrix.version }}
119121
122+
- name: Set up QEMU
123+
uses: docker/setup-qemu-action@v3
124+
125+
- name: Set up Docker Buildx
126+
id: buildx
127+
uses: docker/setup-buildx-action@v3
128+
120129
- name: Login to GHCR
121130
uses: docker/login-action@v3
122131
with:
@@ -133,7 +142,8 @@ jobs:
133142
push: true
134143
tags: ${{ steps.meta.outputs.tags }}
135144
labels: ${{ steps.meta.outputs.labels }}
136-
cache-from: type=gha
137-
cache-to: type=gha,mode=max
145+
cache-from: type=gha,scope=odoo-${{ matrix.version }}
146+
cache-to: type=gha,mode=max,scope=odoo-${{ matrix.version }}
138147
provenance: mode=max
139148
sbom: true
149+
platforms: linux/amd64,linux/arm64

0 commit comments

Comments
 (0)