Skip to content

Commit

Permalink
Update template.
Browse files Browse the repository at this point in the history
  • Loading branch information
huxuan committed Feb 6, 2024
1 parent d0086d4 commit 067c8ab
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -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
Expand Down

0 comments on commit 067c8ab

Please sign in to comment.