From b54f82e0b85d167d5ec3940aeb6e65535a6f6c65 Mon Sep 17 00:00:00 2001 From: Michael Vasseur <14887731+vmcj@users.noreply.github.com> Date: Thu, 21 Mar 2024 12:17:21 +0100 Subject: [PATCH 1/6] The teammanual is already installed in the image --- docker/domserver/Dockerfile | 2 -- 1 file changed, 2 deletions(-) diff --git a/docker/domserver/Dockerfile b/docker/domserver/Dockerfile index 7c92664d..640d9ae5 100644 --- a/docker/domserver/Dockerfile +++ b/docker/domserver/Dockerfile @@ -13,8 +13,6 @@ RUN apt update \ php-gmp php-xml php-mbstring \ sudo bsdmainutils ntp libcgroup-dev procps \ python3-venv fontconfig \ - texlive-latex-recommended texlive-latex-extra \ - texlive-fonts-recommended texlive-lang-european latexmk tex-gyre \ libcurl4-gnutls-dev libjsoncpp-dev libmagic-dev \ enscript lpr ca-certificates \ && rm -rf /var/lib/apt/lists/* From 5431a3be32b6aa3bf2fb6af142efc0400bcdf2a0 Mon Sep 17 00:00:00 2001 From: Michael Vasseur <14887731+vmcj@users.noreply.github.com> Date: Thu, 21 Mar 2024 18:51:17 +0100 Subject: [PATCH 2/6] Since we have mergequeues this can be simpler --- .github/workflows/build-domjudge-container-PR.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/build-domjudge-container-PR.yml b/.github/workflows/build-domjudge-container-PR.yml index 49141223..15e9b367 100644 --- a/.github/workflows/build-domjudge-container-PR.yml +++ b/.github/workflows/build-domjudge-container-PR.yml @@ -1,7 +1,6 @@ name: 'Build domjudge container (PR)' on: - push: pull_request_target: branches: - main @@ -11,11 +10,6 @@ env: jobs: pr-domjudge: - if: ${{ !(github.repository == 'domjudge/domjudge-packaging' && - github.ref == 'refs/heads/main') && - !contains(github.ref, 'gh-readonly-queue') && - (github.event_name == 'pull_request_target' || - github.event.pull_request.head.repo.full_name != github.repository) }} runs-on: ubuntu-latest steps: - name: Checkout From 543282436e2befdba7c72e7017c0ebdb7f9e8aac Mon Sep 17 00:00:00 2001 From: Michael Vasseur <14887731+vmcj@users.noreply.github.com> Date: Thu, 21 Mar 2024 18:59:24 +0100 Subject: [PATCH 3/6] Remove (but trigger the CI for now..) --- .github/workflows/build-domjudge-container-PR.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build-domjudge-container-PR.yml b/.github/workflows/build-domjudge-container-PR.yml index 15e9b367..e449744a 100644 --- a/.github/workflows/build-domjudge-container-PR.yml +++ b/.github/workflows/build-domjudge-container-PR.yml @@ -1,6 +1,7 @@ name: 'Build domjudge container (PR)' on: + push: pull_request_target: branches: - main From d0bb22b73fe8e530a99982655ea71a84df62c101 Mon Sep 17 00:00:00 2001 From: Michael Vasseur <14887731+vmcj@users.noreply.github.com> Date: Thu, 21 Mar 2024 19:39:35 +0100 Subject: [PATCH 4/6] Only run in our own space This breaks for when people fork but it makes this so much easier to read. --- .github/workflows/build-domjudge-container-PR.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-domjudge-container-PR.yml b/.github/workflows/build-domjudge-container-PR.yml index e449744a..66c37fba 100644 --- a/.github/workflows/build-domjudge-container-PR.yml +++ b/.github/workflows/build-domjudge-container-PR.yml @@ -53,7 +53,7 @@ jobs: run: | cd docker set -x - sh ./build.sh "${{ env.DOMJUDGE_VERSION }}" ${{ github.actor }} + sh ./build.sh "${{ env.DOMJUDGE_VERSION }}" domjudge set +x - run: docker image list @@ -61,10 +61,10 @@ jobs: - name: Build and push run: | for IMG in domserver judgehost default-judgehost-chroot; do - IMAGE_NAME="${GITHUB_REPOSITORY_OWNER@L}/$IMG:${{ env.DOMJUDGE_VERSION }}" - docker image tag "$IMAGE_NAME" ghcr.io/${GITHUB_REPOSITORY_OWNER@L}/$IMG:${{ env.PR_TAG }} - docker image tag "$IMAGE_NAME" ${GITHUB_REPOSITORY_OWNER@L}/$IMG:${{ env.PR_TAG }} - docker push ghcr.io/${GITHUB_REPOSITORY_OWNER@L}/$IMG:${{ env.PR_TAG }} + IMAGE_NAME="domjudge/$IMG:${{ env.DOMJUDGE_VERSION }}" + docker image tag "$IMAGE_NAME" ghcr.io/domjudge/$IMG:${{ env.PR_TAG }} + docker image tag "$IMAGE_NAME" domjudge/$IMG:${{ env.PR_TAG }} + docker push ghcr.io/domjudge/$IMG:${{ env.PR_TAG }} done - name: Check for wrong permisions From 6d9f9187654b80ce98b99cab5a0b222dde345f9e Mon Sep 17 00:00:00 2001 From: Michael Vasseur <14887731+vmcj@users.noreply.github.com> Date: Thu, 21 Mar 2024 19:40:58 +0100 Subject: [PATCH 5/6] No idea why I put this here --- .github/workflows/build-domjudge-container-PR.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-domjudge-container-PR.yml b/.github/workflows/build-domjudge-container-PR.yml index 66c37fba..0bd7c134 100644 --- a/.github/workflows/build-domjudge-container-PR.yml +++ b/.github/workflows/build-domjudge-container-PR.yml @@ -63,7 +63,7 @@ jobs: for IMG in domserver judgehost default-judgehost-chroot; do IMAGE_NAME="domjudge/$IMG:${{ env.DOMJUDGE_VERSION }}" docker image tag "$IMAGE_NAME" ghcr.io/domjudge/$IMG:${{ env.PR_TAG }} - docker image tag "$IMAGE_NAME" domjudge/$IMG:${{ env.PR_TAG }} + #docker image tag "$IMAGE_NAME" domjudge/$IMG:${{ env.PR_TAG }} docker push ghcr.io/domjudge/$IMG:${{ env.PR_TAG }} done From 043b12635e52458a8eefc3fdca4c11c22323f1bc Mon Sep 17 00:00:00 2001 From: Michael Vasseur <14887731+vmcj@users.noreply.github.com> Date: Fri, 22 Mar 2024 10:34:39 +0100 Subject: [PATCH 6/6] Remove --- .github/workflows/build-domjudge-container-PR.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build-domjudge-container-PR.yml b/.github/workflows/build-domjudge-container-PR.yml index 0bd7c134..e016738f 100644 --- a/.github/workflows/build-domjudge-container-PR.yml +++ b/.github/workflows/build-domjudge-container-PR.yml @@ -62,6 +62,7 @@ jobs: run: | for IMG in domserver judgehost default-judgehost-chroot; do IMAGE_NAME="domjudge/$IMG:${{ env.DOMJUDGE_VERSION }}" + echo "$IMAGE_NAME" docker image tag "$IMAGE_NAME" ghcr.io/domjudge/$IMG:${{ env.PR_TAG }} #docker image tag "$IMAGE_NAME" domjudge/$IMG:${{ env.PR_TAG }} docker push ghcr.io/domjudge/$IMG:${{ env.PR_TAG }}