Skip to content

Commit

Permalink
Avoid some repetitions in ci workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
sbidoul committed Oct 21, 2023
1 parent 58826d0 commit bb6e75e
Showing 1 changed file with 6 additions and 13 deletions.
19 changes: 6 additions & 13 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -148,15 +148,15 @@ jobs:
- name: Build image
uses: docker/build-push-action@v3
with:
build-args: |
build-args: &build-args |
python_version=${{ matrix.python_version }}
odoo_version=${{ matrix.odoo_version }}
odoo_org_repo=${{ matrix.odoo_org_repo }}
setuptools_constraint=${{ matrix.setuptools_constraint }}
virtualenv_constraint=${{ matrix.virtualenv_constraint }}
tags: |
tags: &tags |
ghcr.io/oca/oca-ci/${{ matrix.image_name }}:latest
labels: |
labels: &labels |
org.opencontainers.image.source=${{ github.event.repository.html_url }}
cache-from: type=registry,ref=ghcr.io/oca/oca-ci/${{ matrix.image_name }}:latest
cache-to: type=local,dest=/tmp/.buildx-cache
Expand All @@ -170,16 +170,9 @@ jobs:
- name: Push image
uses: docker/build-push-action@v3
with:
build-args: |
python_version=${{ matrix.python_version }}
odoo_version=${{ matrix.odoo_version }}
odoo_org_repo=${{ matrix.odoo_org_repo }}
setuptools_constraint=${{ matrix.setuptools_constraint }}
virtualenv_constraint=${{ matrix.virtualenv_constraint }}
tags: |
ghcr.io/oca/oca-ci/${{ matrix.image_name }}:latest
labels: |
org.opencontainers.image.source=${{ github.event.repository.html_url }}
build-args: *build-args
tags: *tags
labels: *labels
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=inline
push: true
Expand Down

0 comments on commit bb6e75e

Please sign in to comment.