Skip to content

Commit

Permalink
[PHP] push to ghcr.io/lrew/php
Browse files Browse the repository at this point in the history
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
  • Loading branch information
khs1994 committed Nov 24, 2024
1 parent 9dfe015 commit d65195f
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/actions/setup-docker/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ inputs:
}
required: false
runs:
using: 'node16'
using: 'node20'
main: 'lib/setup-docker.js'
branding:
icon: 'box'
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/setup-docker/lib/setup-docker.js
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ system_profiler SPHardwareDataType || true

core.debug('add apt-key');
await shell(`
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor | sudo cat >/usr/share/keyrings/docker-archive-keyring.gpg
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor | sudo sh -c 'cat >/usr/share/keyrings/docker-archive-keyring.gpg'
`);

message = 'add apt source';
Expand Down
5 changes: 3 additions & 2 deletions dockerfile/php/.github/workflows/php_8_1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,20 +81,20 @@ jobs:
else \
IS_PUSH=--push; \
DOCKER_HUB_USERNAME=$DOCKER_HUB_USERNAME_TEST; \
mirror="${add_mirror2}"; \
fi; \
else \
IS_PUSH=--push \
&& mirror="${add_mirror}"; \
fi

VCS_REF=`git rev-parse --short HEAD`
CACHE_IMAGE=ghcr.io/${DOCKER_HUB_USERNAME}/php
CACHE_IMAGE=ghcr.io/${DOCKER_HUB_USERNAME}/php-cache
# CACHE_IMAGE=${DOCKER_HUB_USERNAME}/php

options="--build-arg USERNAME=$DOCKER_HUB_USERNAME \
--build-arg VCS_REF=$VCS_REF \
--build-arg PHP_VERSION=$PHP_TAG_VERSION \
--cache-from=khs1994/php:${FOLDER}-arm-${TYPE,,}-cache \
--cache-from=${CACHE_IMAGE}:${FOLDER}-${TYPE,,}-cache \
--cache-to=${CACHE_IMAGE}:${FOLDER}-${TYPE,,}-cache"

Expand Down Expand Up @@ -197,4 +197,5 @@ jobs:
PHP_TAG_VERSION: "8.1.31"
TYPE: ${{ matrix.TYPE }}
add_mirror: registry.us-east-1.aliyuncs.com/khs1994-us/php pcit-docker.pkg.coding.net/khs1994-docker/khs1994/php ghcr.io/khs1994/php
add_mirror2: ghcr.io/lrew/php
name: 'Build Image'
5 changes: 3 additions & 2 deletions dockerfile/php/.github/workflows/php_8_2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,20 +81,20 @@ jobs:
else \
IS_PUSH=--push; \
DOCKER_HUB_USERNAME=$DOCKER_HUB_USERNAME_TEST; \
mirror="${add_mirror2}"; \
fi; \
else \
IS_PUSH=--push \
&& mirror="${add_mirror}"; \
fi

VCS_REF=`git rev-parse --short HEAD`
CACHE_IMAGE=ghcr.io/${DOCKER_HUB_USERNAME}/php
CACHE_IMAGE=ghcr.io/${DOCKER_HUB_USERNAME}/php-cache
# CACHE_IMAGE=${DOCKER_HUB_USERNAME}/php

options="--build-arg USERNAME=$DOCKER_HUB_USERNAME \
--build-arg VCS_REF=$VCS_REF \
--build-arg PHP_VERSION=$PHP_TAG_VERSION \
--cache-from=khs1994/php:${FOLDER}-arm-${TYPE,,}-cache \
--cache-from=${CACHE_IMAGE}:${FOLDER}-${TYPE,,}-cache \
--cache-to=${CACHE_IMAGE}:${FOLDER}-${TYPE,,}-cache"

Expand Down Expand Up @@ -197,4 +197,5 @@ jobs:
PHP_TAG_VERSION: "8.2.26"
TYPE: ${{ matrix.TYPE }}
add_mirror: registry.us-east-1.aliyuncs.com/khs1994-us/php pcit-docker.pkg.coding.net/khs1994-docker/khs1994/php ghcr.io/khs1994/php
add_mirror2: ghcr.io/lrew/php
name: 'Build Image'
5 changes: 3 additions & 2 deletions dockerfile/php/.github/workflows/php_8_3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,20 +81,20 @@ jobs:
else \
IS_PUSH=--push; \
DOCKER_HUB_USERNAME=$DOCKER_HUB_USERNAME_TEST; \
mirror="${add_mirror2}"; \
fi; \
else \
IS_PUSH=--push \
&& mirror="${add_mirror}"; \
fi

VCS_REF=`git rev-parse --short HEAD`
CACHE_IMAGE=ghcr.io/${DOCKER_HUB_USERNAME}/php
CACHE_IMAGE=ghcr.io/${DOCKER_HUB_USERNAME}/php-cache
# CACHE_IMAGE=${DOCKER_HUB_USERNAME}/php

options="--build-arg USERNAME=$DOCKER_HUB_USERNAME \
--build-arg VCS_REF=$VCS_REF \
--build-arg PHP_VERSION=$PHP_TAG_VERSION \
--cache-from=khs1994/php:${FOLDER}-arm-${TYPE,,}-cache \
--cache-from=${CACHE_IMAGE}:${FOLDER}-${TYPE,,}-cache \
--cache-to=${CACHE_IMAGE}:${FOLDER}-${TYPE,,}-cache"

Expand Down Expand Up @@ -197,4 +197,5 @@ jobs:
PHP_TAG_VERSION: "8.3.12"
TYPE: ${{ matrix.TYPE }}
add_mirror: registry.us-east-1.aliyuncs.com/khs1994-us/php pcit-docker.pkg.coding.net/khs1994-docker/khs1994/php ghcr.io/khs1994/php
add_mirror2: ghcr.io/lrew/php
name: 'Build Image'
3 changes: 1 addition & 2 deletions dockerfile/php/.github/workflows/php_nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ jobs:
fi

VCS_REF=`git rev-parse --short HEAD`
CACHE_IMAGE=ghcr.io/${DOCKER_HUB_USERNAME}/php
CACHE_IMAGE=ghcr.io/${DOCKER_HUB_USERNAME}/php-cache
# CACHE_IMAGE=${DOCKER_HUB_USERNAME}/php

if [ -z "${PHP_VCS_REF}" -o "${PHP_VCS_REF}" = 'master' ];then
Expand All @@ -88,7 +88,6 @@ jobs:
options="--build-arg VCS_REF=$VCS_REF \
--build-arg PHP_VCS_REF=$PHP_VCS_REF \
--build-arg PHP_VERSION=$PHP_TAG_VERSION \
--cache-from=khs1994/php:${FOLDER}-arm-${TYPE,,}-cache \
--cache-from=${CACHE_IMAGE}:${FOLDER}-${TYPE,,}-cache \
--cache-to=${CACHE_IMAGE}:${FOLDER}-${TYPE,,}-cache"
echo $options
Expand Down
2 changes: 1 addition & 1 deletion dockerfile/php/.github/workflows/php_zz_tool.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ jobs:
fi

VCS_REF=`git rev-parse --short HEAD`
CACHE_IMAGE=ghcr.io/${DOCKER_HUB_USERNAME}/php
CACHE_IMAGE=ghcr.io/${DOCKER_HUB_USERNAME}/php-cache
# CACHE_IMAGE=${DOCKER_HUB_USERNAME}/php

echo "::group::Build php-cs-fixer"
Expand Down

0 comments on commit d65195f

Please sign in to comment.