From 067c8abb88e46f63584e1b7e83a6accb254986e5 Mon Sep 17 00:00:00 2001 From: Xuan Hu Date: Tue, 6 Feb 2024 08:45:32 +0000 Subject: [PATCH] Update template. --- .../workflows/devcontainer.yml.jinja | 4 ++-- .../workflows/release.yml.jinja | 10 +++++----- .../workflows/devcontainer.yml.jinja | 4 ++-- .../workflows/release.yml.jinja | 10 +++++----- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/template/[% if repo_host_type == 'github.com' %].github[% endif %]/workflows/devcontainer.yml.jinja b/template/[% if repo_host_type == 'github.com' %].github[% endif %]/workflows/devcontainer.yml.jinja index 0b6ad0b8..1d403ffb 100644 --- a/template/[% if repo_host_type == 'github.com' %].github[% endif %]/workflows/devcontainer.yml.jinja +++ b/template/[% if repo_host_type == 'github.com' %].github[% endif %]/workflows/devcontainer.yml.jinja @@ -23,8 +23,8 @@ jobs: with: build-args: | PYTHON_VERSION={{ '${{ matrix.python-version }}' }} - cache-from: type=registry,ref=ghcr.io/{{ '${{ github.repository }}' }}/build-cache-dev:py{{ '${{ matrix.python-version }}' }} - cache-to: type=registry,ref=ghcr.io/{{ '${{ github.repository }}' }}/build-cache-dev:py{{ '${{ matrix.python-version }}' }},mode=max + cache-from: type=registry,ref=ghcr.io/{{ '${{ github.repository }}' }}/dev-cache:py{{ '${{ matrix.python-version }}' }} + cache-to: type=registry,ref=ghcr.io/{{ '${{ github.repository }}' }}/dev-cache:py{{ '${{ matrix.python-version }}' }},mode=max file: .devcontainer/Dockerfile provenance: false push: true diff --git a/template/[% if repo_host_type == 'github.com' %].github[% endif %]/workflows/release.yml.jinja b/template/[% if repo_host_type == 'github.com' %].github[% endif %]/workflows/release.yml.jinja index d955f5a2..0527fbec 100644 --- a/template/[% if repo_host_type == 'github.com' %].github[% endif %]/workflows/release.yml.jinja +++ b/template/[% if repo_host_type == 'github.com' %].github[% endif %]/workflows/release.yml.jinja @@ -71,8 +71,8 @@ jobs: with: build-args: | PYTHON_VERSION={{ '${{ matrix.python-version }}' }} - cache-from: type=registry,ref=ghcr.io/{{ '${{ github.repository }}' }}/build-cache-dev:py{{ '${{ matrix.python-version }}' }} - cache-to: type=registry,ref=ghcr.io/{{ '${{ github.repository }}' }}/build-cache-dev:py{{ '${{ matrix.python-version }}' }},mode=max + cache-from: type=registry,ref=ghcr.io/{{ '${{ github.repository }}' }}/dev-cache:py{{ '${{ matrix.python-version }}' }} + cache-to: type=registry,ref=ghcr.io/{{ '${{ github.repository }}' }}/dev-cache:py{{ '${{ matrix.python-version }}' }},mode=max file: .devcontainer/Dockerfile provenance: false push: true @@ -88,13 +88,13 @@ jobs: build-args: | PYTHON_VERSION={{ '${{ matrix.python-version }}' }} PDM_BUILD_SCM_VERSION={{ '${{ github.ref_name }}' }} - cache-from: type=registry,ref=ghcr.io/{{ '${{ github.repository }}' }}/build-cache-dev:py{{ '${{ matrix.python-version }}' }} + cache-from: type=registry,ref=ghcr.io/{{ '${{ github.repository }}' }}/dev-cache:py{{ '${{ matrix.python-version }}' }} file: .devcontainer/Dockerfile provenance: false push: true tags: | - ghcr.io/{{ '${{ github.repository }}' }}/prod:py{{ '${{ matrix.python-version }}' }} - ghcr.io/{{ '${{ github.repository }}' }}/prod:py{{ '${{ matrix.python-version }}' }}-{{ '${{ github.ref_name }}' }} + ghcr.io/{{ '${{ github.repository }}' }}:py{{ '${{ matrix.python-version }}' }} + ghcr.io/{{ '${{ github.repository }}' }}:py{{ '${{ matrix.python-version }}' }}-{{ '${{ github.ref_name }}' }} target: prod strategy: matrix: diff --git a/template/[% if repo_host_type == 'gitlab.com' or repo_host_type == 'gitlab-self-managed' %].gitlab[% endif %]/workflows/devcontainer.yml.jinja b/template/[% if repo_host_type == 'gitlab.com' or repo_host_type == 'gitlab-self-managed' %].gitlab[% endif %]/workflows/devcontainer.yml.jinja index b600896f..080a2fd2 100644 --- a/template/[% if repo_host_type == 'gitlab.com' or repo_host_type == 'gitlab-self-managed' %].gitlab[% endif %]/workflows/devcontainer.yml.jinja +++ b/template/[% if repo_host_type == 'gitlab.com' or repo_host_type == 'gitlab-self-managed' %].gitlab[% endif %]/workflows/devcontainer.yml.jinja @@ -31,8 +31,8 @@ dev-container-publish: - | docker buildx build . \ --build-arg PYTHON_VERSION=${PYTHON_VERSION} \ - --cache-from type=registry,ref=${CI_REGISTRY_IMAGE}/build-cache-dev:py${PYTHON_VERSION} \ - --cache-to type=registry,ref=${CI_REGISTRY_IMAGE}/build-cache-dev:py${PYTHON_VERSION},mode=max \ + --cache-from type=registry,ref=${CI_REGISTRY_IMAGE}/dev-cache:py${PYTHON_VERSION} \ + --cache-to type=registry,ref=${CI_REGISTRY_IMAGE}/dev-cache:py${PYTHON_VERSION},mode=max \ --file .devcontainer/Dockerfile \ --provenance false \ --push \ diff --git a/template/[% if repo_host_type == 'gitlab.com' or repo_host_type == 'gitlab-self-managed' %].gitlab[% endif %]/workflows/release.yml.jinja b/template/[% if repo_host_type == 'gitlab.com' or repo_host_type == 'gitlab-self-managed' %].gitlab[% endif %]/workflows/release.yml.jinja index d0418147..46b5f125 100644 --- a/template/[% if repo_host_type == 'gitlab.com' or repo_host_type == 'gitlab-self-managed' %].gitlab[% endif %]/workflows/release.yml.jinja +++ b/template/[% if repo_host_type == 'gitlab.com' or repo_host_type == 'gitlab-self-managed' %].gitlab[% endif %]/workflows/release.yml.jinja @@ -56,8 +56,8 @@ container-publish: - | docker buildx build . \ --build-arg PYTHON_VERSION=${PYTHON_VERSION} \ - --cache-from type=registry,ref=${CI_REGISTRY_IMAGE}/build-cache-dev:py${PYTHON_VERSION} \ - --cache-to type=registry,ref=${CI_REGISTRY_IMAGE}/build-cache-dev:py${PYTHON_VERSION},mode=max \ + --cache-from type=registry,ref=${CI_REGISTRY_IMAGE}/dev-cache:py${PYTHON_VERSION} \ + --cache-to type=registry,ref=${CI_REGISTRY_IMAGE}/dev-cache:py${PYTHON_VERSION},mode=max \ --file .devcontainer/Dockerfile \ --provenance false \ --push \ @@ -68,12 +68,12 @@ container-publish: docker buildx build . \ --build-arg PDM_BUILD_SCM_VERSION=${CI_COMMIT_TAG} \ --build-arg PYTHON_VERSION=${PYTHON_VERSION} \ - --cache-from type=registry,ref=${CI_REGISTRY_IMAGE}/build-cache-dev:py${PYTHON_VERSION} \ + --cache-from type=registry,ref=${CI_REGISTRY_IMAGE}/dev-cache:py${PYTHON_VERSION} \ --file .devcontainer/Dockerfile \ --provenance false \ --push \ - --tag ${CI_REGISTRY_IMAGE}/prod:py${PYTHON_VERSION} \ - --tag ${CI_REGISTRY_IMAGE}/prod:py${PYTHON_VERSION}-${CI_COMMIT_TAG} \ + --tag ${CI_REGISTRY_IMAGE}:py${PYTHON_VERSION} \ + --tag ${CI_REGISTRY_IMAGE}:py${PYTHON_VERSION}-${CI_COMMIT_TAG} \ --target prod services: - docker:dind