From b5b6eee0214c98dc9225f788485f8c88baefb445 Mon Sep 17 00:00:00 2001 From: Verwoerd Date: Mon, 23 Sep 2024 13:07:39 +0200 Subject: [PATCH 1/4] Add missing shortnames, fixes #8. Also updates deprecated actions. --- .github/workflows/make_logos.yaml | 8 ++++---- universities/organizations.json | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/make_logos.yaml b/.github/workflows/make_logos.yaml index f55341b..1e8b11e 100644 --- a/.github/workflows/make_logos.yaml +++ b/.github/workflows/make_logos.yaml @@ -20,7 +20,7 @@ jobs: uses: actions/checkout@v2 - name: Run export run: ./export.sh --universities --companies --studies --background --transparent --output-directory out 64 256 - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v4 with: name: logos path: out @@ -30,7 +30,7 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 - - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v4.1.7 with: name: logos path: out @@ -54,7 +54,7 @@ jobs: http -a admin:$ADMINPASS --check-status -b PUT "http://localhost:12345/api/config" show_affiliation_logos=true show_flags=true show_affiliations=true data_source=1 --ignore-stdin http -a admin:$ADMINPASS --verbose --check-status -b GET "http://localhost:12345/api/config" xvfb-run --server-args="-screen 0, 1024x768x24" cutycapt --url=http://localhost:12345 --out=scoreboard.png - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v4 with: name: DJ_scoreboard path: scoreboard.png @@ -65,7 +65,7 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 - - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v4.1.7 with: name: logos path: out diff --git a/universities/organizations.json b/universities/organizations.json index 26a0b77..5e073a7 100644 --- a/universities/organizations.json +++ b/universities/organizations.json @@ -217,7 +217,7 @@ }, { "id": "U-3397", - "name": "", + "name": "Chalmers", "formal_name": "Chalmers University of Technology", "country": "SWE" }, @@ -253,7 +253,7 @@ }, { "id": "U-3758", - "name": "", + "name": "KCL", "formal_name": "King's College London", "country": "GBR" }, @@ -403,7 +403,7 @@ }, { "id": "U-8102", - "name": "", + "name": "Passau", "formal_name": "University of Passau", "country": "DEU" }, From 5e85d191168738da6140b9dc09d731077ee89808 Mon Sep 17 00:00:00 2001 From: Verwoerd Date: Mon, 23 Sep 2024 13:14:46 +0200 Subject: [PATCH 2/4] Attempt to fix the test phase of the build --- .github/workflows/make_logos.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/make_logos.yaml b/.github/workflows/make_logos.yaml index 1e8b11e..64d9180 100644 --- a/.github/workflows/make_logos.yaml +++ b/.github/workflows/make_logos.yaml @@ -43,9 +43,9 @@ jobs: sudo apt update; sudo apt install cutycapt xvfb httpie -y mkdir $afftmp cp ${{ github.workspace }}/out/background_64/* $afftmp - docker-compose -f .github/workflows/domjudge/docker-compose.yml up -d mariadb + docker compose -f .github/workflows/domjudge/docker-compose.yml up -d mariadb sleep 30s - docker-compose -f .github/workflows/domjudge/docker-compose.yml up -d domjudge + docker compose -f .github/workflows/domjudge/docker-compose.yml up -d domjudge sleep 1m ADMINPASS=$(docker exec -i domjudge_domjudge_1 cat /opt/domjudge/domserver/etc/initial_admin_password.secret) http -a admin:$ADMINPASS --check-status -b -f POST "http://localhost:12345/api/users/organizations" json@out/organizations.json From 67a06e5520757784c8bbd522ff496b6c65585732 Mon Sep 17 00:00:00 2001 From: Verwoerd Date: Mon, 23 Sep 2024 13:20:50 +0200 Subject: [PATCH 3/4] Fix adminpass retrieval in build --- .github/workflows/make_logos.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/make_logos.yaml b/.github/workflows/make_logos.yaml index 64d9180..078095b 100644 --- a/.github/workflows/make_logos.yaml +++ b/.github/workflows/make_logos.yaml @@ -47,7 +47,7 @@ jobs: sleep 30s docker compose -f .github/workflows/domjudge/docker-compose.yml up -d domjudge sleep 1m - ADMINPASS=$(docker exec -i domjudge_domjudge_1 cat /opt/domjudge/domserver/etc/initial_admin_password.secret) + ADMINPASS=$(docker exec -i domjudge_domjudge-1 cat /opt/domjudge/domserver/etc/initial_admin_password.secret) http -a admin:$ADMINPASS --check-status -b -f POST "http://localhost:12345/api/users/organizations" json@out/organizations.json jq "[.[] | {\"organization_id\": .id, \"name\": .formal_name, \"id\":1, \"group_ids\": [\"3\"]}] | to_entries | map( (.value.id = \"\(1+.key)\" ) | .value)" out/organizations.json > teams.json http -a admin:$ADMINPASS --check-status -b -f POST "http://localhost:12345/api/users/teams" json@teams.json From ed4a79c3f34e9a1a176efe835a2909e26ae4bde1 Mon Sep 17 00:00:00 2001 From: Verwoerd Date: Mon, 23 Sep 2024 13:25:56 +0200 Subject: [PATCH 4/4] Fix adminpass retrieval in build --- .github/workflows/make_logos.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/make_logos.yaml b/.github/workflows/make_logos.yaml index 078095b..6023295 100644 --- a/.github/workflows/make_logos.yaml +++ b/.github/workflows/make_logos.yaml @@ -47,7 +47,7 @@ jobs: sleep 30s docker compose -f .github/workflows/domjudge/docker-compose.yml up -d domjudge sleep 1m - ADMINPASS=$(docker exec -i domjudge_domjudge-1 cat /opt/domjudge/domserver/etc/initial_admin_password.secret) + ADMINPASS=$(docker exec -i domjudge-domjudge-1 cat /opt/domjudge/domserver/etc/initial_admin_password.secret) http -a admin:$ADMINPASS --check-status -b -f POST "http://localhost:12345/api/users/organizations" json@out/organizations.json jq "[.[] | {\"organization_id\": .id, \"name\": .formal_name, \"id\":1, \"group_ids\": [\"3\"]}] | to_entries | map( (.value.id = \"\(1+.key)\" ) | .value)" out/organizations.json > teams.json http -a admin:$ADMINPASS --check-status -b -f POST "http://localhost:12345/api/users/teams" json@teams.json