Skip to content

build

build #216

Workflow file for this run

name: build
on:
schedule:
- cron: "01 23 * * *"
push:
branches: [build]
jobs:
# =============== ODOO COMMUNITY ==================
update-source-community:
strategy:
matrix:
ref: [14, 15, 16, 17, 18]
permissions:
contents: write
uses: ./.github/workflows/update-community.yml
with:
ref: ${{ matrix.ref }}
version_code: ${{ matrix.ref }}.0
secrets: inherit
build-community:
needs: update-source-community
strategy:
matrix:
ref: [14, 15, 16, 17, 18]
permissions:
contents: write
uses: ./.github/workflows/build-community.yml
with:
ref: ${{ matrix.ref }}
image_name: odoo
image_tag: odoo:${{ matrix.ref }}
version_code: ${{ matrix.ref }}.0
secrets: inherit
delete-untagged-community-images:
runs-on: ubuntu-latest
needs: build-community
env:
package_manage_token: ${{ secrets.GH_TOKEN }}
organization: ${{ vars.ORGANIZATION_NAME }}
repository: ${{ vars.COMMUNITY_DOCKER_REPOSITORY }}
steps:
- name: Remove untagged (old) image from GitHub container registry
uses: actions/delete-package-versions@v5
with:
owner: ${{ env.organization }}
package-name: "odoo"
package-type: "container"
token: ${{ env.package_manage_token }}
min-versions-to-keep: 0
delete-only-untagged-versions: "true"
# =============== ODOO ENTERPRISE ==================
update-source-enterprise:
strategy:
matrix:
ref: [9, 10, 11, 12, 13, 14, 15, 16, 17, 18]
et_workspace_path: ["./et-addons"]
permissions:
contents: write
uses: ./.github/workflows/update-enterprise.yml
with:
ref: ${{ matrix.ref }}
original_ref: ${{ matrix.ref }}.0
et_workspace_path: ${{ matrix.et_workspace_path }}
secrets: inherit
build-enterprise:
needs: [update-source-enterprise, build-community]
strategy:
matrix:
ref: [15, 16, 17, 18]
et_workspace_path: ["./et-addons"]
uses: ./.github/workflows/build-enterprise.yml
with:
ref: ${{ matrix.ref }}
image_name: odoo-ent
image_tag: odoo-ent:${{ matrix.ref }}
et_workspace_path: ${{ matrix.et_workspace_path }}
secrets: inherit
delete-untagged-enterprise-images:
runs-on: ubuntu-latest
needs: build-enterprise
env:
package_manage_token: ${{ secrets.GH_TOKEN }}
organization: ${{ vars.ORGANIZATION_NAME }}
repository: ${{ vars.COMMUNITY_DOCKER_REPOSITORY }}
steps:
- name: Remove untagged (old) image from GitHub container registry
uses: actions/delete-package-versions@v5
with:
owner: ${{ env.organization }}
package-name: "odoo-ent"
package-type: "container"
token: ${{ env.package_manage_token }}
min-versions-to-keep: 0
delete-only-untagged-versions: "true"
# - name: Remove untagged (old) image from GitHub container registry
# uses: ./.github/actions/delete-untagged-packages
# with:
# github_token: ${{ env.package_manage_token }}
# package_name: odoo-ent
# organization: ${{ env.organization }}