From 22bdbaf6ed0f77d1d7ba289b561db16dc0acb7c3 Mon Sep 17 00:00:00 2001 From: Michael Vasseur Date: Sun, 2 Jun 2024 13:37:25 +0200 Subject: [PATCH] Don't hog workers --- .../build-contributor-container-PR.yml | 47 ------------------ .../build-contributor-container-release.yml | 37 -------------- .../workflows/build-gitlab-container-PR.yml | 48 ------------------- .../build-gitlab-container-release.yml | 45 ----------------- 4 files changed, 177 deletions(-) delete mode 100644 .github/workflows/build-contributor-container-PR.yml delete mode 100644 .github/workflows/build-contributor-container-release.yml delete mode 100644 .github/workflows/build-gitlab-container-PR.yml delete mode 100644 .github/workflows/build-gitlab-container-release.yml diff --git a/.github/workflows/build-contributor-container-PR.yml b/.github/workflows/build-contributor-container-PR.yml deleted file mode 100644 index 90fcc57..0000000 --- a/.github/workflows/build-contributor-container-PR.yml +++ /dev/null @@ -1,47 +0,0 @@ -name: 'Build Contributor container (PR)' -# For speedup to do this in parallel: https://docs.docker.com/build/ci/github-actions/multi-platform/ -# Loosely based on: https://docs.docker.com/build/ci/github-actions/push-multi-registries/ - -on: - push: - pull_request: - branches: - - main - -jobs: - pr-contributor: - if: ${{ !(github.repository == 'domjudge/domjudge-packaging' && - github.ref == 'refs/heads/main') && - !contains(github.ref, 'gh-readonly-queue') && - (github.event_name == 'pull_request' || - github.event.pull_request.head.repo.full_name != github.repository) }} - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - name: Login to GitHub container registry - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Extract metadata (tags, labels) for Docker - id: meta - uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7 - with: - images: ghcr.io/${{ github.repository }} - - - name: Build and push - uses: docker/build-push-action@v5 - with: - context: docker-contributor - platforms: linux/amd64,linux/arm64 - push: true - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} - diff --git a/.github/workflows/build-contributor-container-release.yml b/.github/workflows/build-contributor-container-release.yml deleted file mode 100644 index 9d79cbf..0000000 --- a/.github/workflows/build-contributor-container-release.yml +++ /dev/null @@ -1,37 +0,0 @@ -name: 'Build Contributor container (Release)' -# For speedup to do this in parallel: https://docs.docker.com/build/ci/github-actions/multi-platform/ -# Loosely based on: https://docs.docker.com/build/ci/github-actions/push-multi-registries/ - -on: - schedule: - - cron: "5 4 * * 5" - push: - branches: - - main - workflow_dispatch: - -jobs: - release-contributor: - if: ${{ github.repository == 'domjudge/domjudge-packaging' }} - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - name: Login to Docker Hub - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Build and push - uses: docker/build-push-action@v5 - with: - context: docker-contributor - platforms: linux/amd64,linux/arm64 - push: true - tags: domjudge/domjudge-contributor:latest - diff --git a/.github/workflows/build-gitlab-container-PR.yml b/.github/workflows/build-gitlab-container-PR.yml deleted file mode 100644 index 0b02c3c..0000000 --- a/.github/workflows/build-gitlab-container-PR.yml +++ /dev/null @@ -1,48 +0,0 @@ -name: 'Build GitLab CI container (PR)' - -on: - push: - pull_request: - branches: - - main - -jobs: - pr-gitlab: - if: ${{ !(github.repository == 'domjudge/domjudge-packaging' && - github.ref == 'refs/heads/main') && - !contains(github.ref, 'gh-readonly-queue') && - (github.event_name == 'pull_request' || - github.event.pull_request.head.repo.full_name != github.repository) }} - name: PR GitLab image - runs-on: ubuntu-latest - permissions: - packages: write - contents: read - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Use the same PHP config as the contributor containers - run: cp -r docker-{contributor,gitlabci}/php-config - - - name: Log in to GitHub Container registry (possibly at fork) - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Extract metadata (tags, labels) for Docker - id: meta - uses: docker/metadata-action@v5 - with: - images: ghcr.io/${{ github.repository }} - - - name: Build and push Docker images - uses: docker/build-push-action@v5 - with: - context: "./docker-gitlabci" - push: true - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} - diff --git a/.github/workflows/build-gitlab-container-release.yml b/.github/workflows/build-gitlab-container-release.yml deleted file mode 100644 index d9341af..0000000 --- a/.github/workflows/build-gitlab-container-release.yml +++ /dev/null @@ -1,45 +0,0 @@ -name: 'Build GitLab CI container (Release)' - -on: - schedule: - - cron: "4 3 * * 5" - push: - branches: - - main - workflow_dispatch: - -jobs: - build-gitlab: - if: ${{ github.repository == 'domjudge/domjudge-packaging' }} - name: Build GitLab image - runs-on: ubuntu-latest - permissions: - packages: write - contents: read - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Use the same PHP config as the contributor containers - run: cp -r docker-{contributor,gitlabci}/php-config - - - name: Log in to Docker Container registry - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Extract metadata (tags, labels) for Docker - id: meta - uses: docker/metadata-action@v5 - with: - images: domjudge/gitlabci - - - name: Build and push Docker images - uses: docker/build-push-action@v5 - with: - context: "./docker-gitlabci" - push: true - tags: "domjudge/gitlabci:24.04" - labels: ${{ steps.meta.outputs.labels }} -