-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Re-add ability to use Docker for development post-switch to Cloud VPS. Support for Trove has been added, along with a few tweaks (like moving execution to a non-root user, as required by Symfony). Also moved off of Toolforge images and onto global `php` images, since CopyPatrol isn't expected to run on Toolforge anymore.
- Loading branch information
1 parent
6a9361d
commit a7bb6cc
Showing
5 changed files
with
247 additions
and
152 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,7 @@ jobs: | |
name: Build and test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Setup PHP | ||
|
@@ -29,74 +29,59 @@ jobs: | |
./bin/console lint:yaml ./config | ||
./vendor/bin/minus-x check . | ||
./bin/phpunit --exclude-group=integration | ||
build_image: | ||
name: Build Docker image | ||
runs-on: ubuntu-latest | ||
needs: build | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
|
||
- name: Set up Docker Buildx | ||
id: buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Build image | ||
id: docker_build | ||
uses: docker/build-push-action@v6 | ||
with: | ||
context: . | ||
file: docker/Dockerfile | ||
target: production | ||
tags: wikimedia/copypatrol:latest | ||
outputs: type=docker,dest=/tmp/copypatrol-production.image.tar | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max | ||
|
||
- name: Image digest | ||
run: echo ${{ steps.docker_build.outputs.digest }} | ||
|
||
- name: Upload Docker image to artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: image-production | ||
path: /tmp/copypatrol-production.image.tar | ||
analysis: | ||
name: Analyze Docker images | ||
runs-on: ubuntu-latest | ||
needs: build_image | ||
|
||
steps: | ||
- name: Download Docker image from artifacts | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: image-production | ||
path: /tmp | ||
|
||
# build_image: | ||
# name: Build Docker image | ||
# runs-on: ubuntu-latest | ||
# needs: build | ||
# strategy: | ||
# matrix: | ||
# targets: | ||
# - name: production | ||
# tag: wikimedia/copypatrol | ||
# - name: development | ||
# tag: wikimedia/copypatrol-development | ||
# steps: | ||
# - name: Checkout code | ||
# uses: actions/checkout@v2 | ||
# | ||
# - name: Set up QEMU | ||
# uses: docker/setup-qemu-action@v2 | ||
# | ||
# - name: Set up Docker Buildx | ||
# id: buildx | ||
# uses: docker/setup-buildx-action@v2 | ||
# | ||
# - name: Build image | ||
# id: docker_build | ||
# uses: docker/build-push-action@v4 | ||
# with: | ||
# context: . | ||
# file: docker/Dockerfile | ||
# target: ${{ matrix.targets.name }} | ||
# tags: ${{ matrix.targets.tag }}:latest | ||
# outputs: type=docker,dest=/tmp/copypatrol-${{ matrix.targets.name }}.image.tar | ||
# cache-from: type=gha | ||
# cache-to: type=gha,mode=max | ||
# | ||
# - name: Image digest | ||
# run: echo ${{ steps.docker_build.outputs.digest }} | ||
# | ||
# - name: Upload Docker image to artifacts | ||
# uses: actions/upload-artifact@v2 | ||
# with: | ||
# name: image-${{ matrix.targets.name }} | ||
# path: /tmp/copypatrol-${{ matrix.targets.name }}.image.tar | ||
# analysis: | ||
# name: Analyze Docker images | ||
# runs-on: ubuntu-latest | ||
# needs: build_image | ||
# strategy: | ||
# matrix: | ||
# targets: | ||
# - name: production | ||
# tag: wikimedia/copypatrol | ||
# - name: development | ||
# tag: wikimedia/copypatrol-development | ||
# | ||
# steps: | ||
# - name: Download Docker image from artifacts | ||
# uses: actions/download-artifact@v2 | ||
# with: | ||
# name: image-${{ matrix.targets.name }} | ||
# path: /tmp | ||
# | ||
# - name: Load image | ||
# run: | | ||
# docker load --input /tmp/copypatrol-${{ matrix.targets.name }}.image.tar | ||
# docker image ls -a | ||
# - name: Dive | ||
# uses: yuichielectric/[email protected] | ||
# with: | ||
# image: ${{ matrix.targets.tag }}:latest | ||
# github-token: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Load image | ||
run: | | ||
docker load --input /tmp/copypatrol-production.image.tar | ||
docker image ls -a | ||
- name: Dive | ||
uses: MaxymVlasov/[email protected] | ||
with: | ||
image: wikimedia/copypatrol:latest | ||
github-token: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.