Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 13 additions & 6 deletions .github/workflows/build-deployment-container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,21 @@ jobs:
name: Docker Push
steps:
- uses: actions/checkout@v3
- name: Docker build
run: docker build . -t metacpan/metacpan-web:$GITHUB_SHA
- name: Run Perl tests
run: docker run -i metacpan/metacpan-web carton exec prove -lr --jobs 2 t
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_USER }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}
- name: Push build to Docker hub
run: docker push metacpan/metacpan-web:$GITHUB_SHA
- name: Build test image
- uses: docker/build-push-action@v2
with:
tags: metacpan/metacpan-web:test
target: test
push: false
- name: Run Perl tests
run: docker run -i metacpan/metacpan-web:test
- name: Build and push
uses: docker/build-push-action@v5
with:
push: true
tags: metacpan/metacpan-web:$GITHUB_SHA
19 changes: 13 additions & 6 deletions .github/workflows/build-production-container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,21 @@ jobs:
name: Docker Push
steps:
- uses: actions/checkout@v3
- name: docker build
run: docker build . -t metacpan/metacpan-web:latest -t metacpan/metacpan-web:$GITHUB_SHA
- name: run Perl tests
run: docker run -i metacpan/metacpan-web carton exec prove -lr --jobs 2 t
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_USER }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}
- name: Push build to Docker Hub
run: docker push --all-tags metacpan/metacpan-web
- name: Build test image
- uses: docker/build-push-action@v2
with:
tags: metacpan/metacpan-web:test
target: test
push: false
- name: Run Perl tests
run: docker run -i metacpan/metacpan-web:test
- name: Build and push
uses: docker/build-push-action@v5
with:
push: true
tags: metacpan/metacpan-web:latest,metacpan/metacpan-web:$GITHUB_SHA
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ COPY .perlcriticrc .perltidyrc perlimports.toml tidyall.ini ./
COPY t t

USER metacpan
CMD [ "prove", "-lr", "t" ]
CMD [ "prove", "-l", "-r", "-j", "2", "t" ]

################### Production Server
FROM server AS production
Expand Down