diff --git a/.github/workflows/dockerbuild.yml b/.github/workflows/dockerbuild.yml index 3cc96b2f97..5982947394 100644 --- a/.github/workflows/dockerbuild.yml +++ b/.github/workflows/dockerbuild.yml @@ -32,7 +32,7 @@ jobs: steps: - name: downcase REPO run: | - echo "IMAGE_NAME=${GITHUB_REPOSITORY,,}" >> ${GITHUB_ENV} + echo "IMAGE_NAME=${GITHUB_REPOSITORY,,}-php" >> ${GITHUB_ENV} - if: ${{ matrix.php == 5.4 }} run: | @@ -78,9 +78,15 @@ jobs: uses: docker/metadata-action@v4 with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + tags: | + # set latest tag for default branch + type=raw,value=${{ matrix.php }}-apache,enable={{is_default_branch}} + type=ref,event=branch + type=ref,event=tag + type=ref,event=pr flavor: | latest=auto - suffix=-php-${{ matrix.php }}-apache + prefix=${{ matrix.php }}-apache- - name: Build and export to Docker uses: docker/build-push-action@v3 diff --git a/docker-compose.yml b/docker-compose.yml index beca8b0bfe..0ad70be970 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -16,8 +16,8 @@ services: ec-cube: ### ローカルでビルドする場合は以下のコマンドを使用します ## docker build -t ec-cube2 --no-cache --pull --build-arg TAG=8.1-apache . - ## docker tag ec-cube2 ghcr.io/ec-cube/ec-cube2:master-php-8.1-apache - image: ${REGISTRY:-ghcr.io}/${IMAGE_NAME:-ec-cube/ec-cube2}:${TAG:-master-php-8.1-apache} + ## docker tag ec-cube2 ghcr.io/ec-cube/ec-cube2-php:8.1-apache + image: ${REGISTRY:-ghcr.io}/${IMAGE_NAME:-ec-cube/ec-cube2-php}:${TAG:-8.1-apache} build: context: . volumes: