Skip to content

Commit 2f4af96

Browse files
committed
Build Copy Paste Detector Image
See #127
1 parent 805d29d commit 2f4af96

2 files changed

Lines changed: 51 additions & 3 deletions

File tree

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Build Copy Paste Detector Image
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: "0 6 * * 0" # 6 AM Weekly
7+
push:
8+
branches:
9+
- master
10+
paths:
11+
- .github/workflows/magento-copy-paste-detector-images.yml
12+
- 'magento-copy-paste-detector/**'
13+
workflow_run:
14+
workflows:
15+
- Build Integration Images
16+
types:
17+
- completed
18+
branches:
19+
- master
20+
21+
jobs:
22+
build:
23+
name: "Build and deploy"
24+
25+
runs-on: "ubuntu-latest"
26+
27+
strategy:
28+
matrix:
29+
actions-with-docker-image:
30+
- magento-copy-paste-detector
31+
env:
32+
DOCKER_USERNAME: "extdn"
33+
34+
steps:
35+
- name: "Checkout"
36+
uses: "actions/checkout@v4"
37+
38+
- name: "Build Docker image"
39+
run: "docker build --tag extdn/${{ matrix.actions-with-docker-image }}-action:latest ${{ matrix.actions-with-docker-image }}/. -f ${{ matrix.actions-with-docker-image }}/Dockerfile"
40+
41+
- name: "Docker Login"
42+
run: "echo ${{ secrets.DOCKER_PASSWORD }} | $(which docker) login --password-stdin --username ${{ env.DOCKER_USERNAME }}"
43+
44+
- name: "Push Docker image (latest)"
45+
run: "docker push extdn/${{ matrix.actions-with-docker-image }}-action:latest"
46+
47+
- name: "Docker Logout"
48+
run: "docker logout"

magento-copy-paste-detector/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
FROM extdn/magento-integration-tests-action:7.3-latest AS builder
1+
FROM extdn/magento-integration-tests-action:8.3-latest AS builder
22
RUN echo memory_limit = -1 >> /usr/local/etc/php/conf.d/custom-memory.ini
3-
RUN composer create-project --repository=https://repo-magento-mirror.fooman.co.nz/ --no-plugins --no-install --no-interaction magento/project-community-edition /var/www/magento2ce "2.4.1"
3+
RUN composer create-project --repository=https://repo-magento-mirror.fooman.co.nz/ --no-plugins --no-install --no-interaction magento/project-community-edition /var/www/magento2ce "2.4.8-p4"
44
WORKDIR "/var/www/magento2ce"
55
# https://github.com/composer/composer/issues/12623#issuecomment-3551953185
66
RUN composer config --unset repositories || true
77
RUN composer config --unset repo.0
88
RUN composer config repo.foomanmirror composer https://repo-magento-mirror.fooman.co.nz/
99
RUN composer install --prefer-dist
1010

11-
FROM extdn/magento-integration-tests-action:7.4-latest
11+
FROM extdn/magento-integration-tests-action:8.3-latest
1212
COPY --from=builder /var/www/magento2ce/ /m2/
1313
RUN echo memory_limit = -1 >> /usr/local/etc/php/conf.d/custom-memory.ini
1414
ADD phpunit.phpcpd.xml /m2/dev/tests/static/phpunit.phpcpd.xml

0 commit comments

Comments
 (0)