diff --git a/.github/workflows/cleanup-ghcr-untagged.yml b/.github/workflows/cleanup-ghcr-untagged.yml index b6dc7618d2..b66767cda8 100644 --- a/.github/workflows/cleanup-ghcr-untagged.yml +++ b/.github/workflows/cleanup-ghcr-untagged.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - package: ['coolify', 'coolify-helper', 'coolify-testing-host'] + package: ['coolify', 'coolify-helper'] steps: - name: Delete untagged ${{ matrix.package }} images uses: actions/delete-package-versions@v5 diff --git a/.github/workflows/coolify-testing-host.yml b/.github/workflows/coolify-testing-host.yml index 0c13715734..7f5fa156fb 100644 --- a/.github/workflows/coolify-testing-host.yml +++ b/.github/workflows/coolify-testing-host.yml @@ -9,10 +9,8 @@ on: permissions: contents: read - packages: write env: - GITHUB_REGISTRY: ghcr.io DOCKER_REGISTRY: docker.io IMAGE_NAME: "coollabsio/coolify-testing-host" @@ -33,13 +31,6 @@ jobs: with: persist-credentials: false - - name: Login to ${{ env.GITHUB_REGISTRY }} - uses: docker/login-action@v3 - with: - registry: ${{ env.GITHUB_REGISTRY }} - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - name: Login to ${{ env.DOCKER_REGISTRY }} uses: docker/login-action@v3 with: @@ -56,7 +47,6 @@ jobs: push: true tags: | ${{ env.DOCKER_REGISTRY }}/${{ env.IMAGE_NAME }}:latest-${{ matrix.arch }} - ${{ env.GITHUB_REGISTRY }}/${{ env.IMAGE_NAME }}:latest-${{ matrix.arch }} labels: | coolify.managed=true @@ -70,13 +60,6 @@ jobs: - uses: docker/setup-buildx-action@v3 - - name: Login to ${{ env.GITHUB_REGISTRY }} - uses: docker/login-action@v3 - with: - registry: ${{ env.GITHUB_REGISTRY }} - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - name: Login to ${{ env.DOCKER_REGISTRY }} uses: docker/login-action@v3 with: @@ -84,13 +67,6 @@ jobs: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Create & publish manifest on ${{ env.GITHUB_REGISTRY }} - run: | - docker buildx imagetools create \ - ${{ env.GITHUB_REGISTRY }}/${{ env.IMAGE_NAME }}:latest-amd64 \ - ${{ env.GITHUB_REGISTRY }}/${{ env.IMAGE_NAME }}:latest-aarch64 \ - --tag ${{ env.GITHUB_REGISTRY }}/${{ env.IMAGE_NAME }}:latest - - name: Create & publish manifest on ${{ env.DOCKER_REGISTRY }} run: | docker buildx imagetools create \ diff --git a/tests/Unit/ProductionImageWorkflowTest.php b/tests/Unit/ProductionImageWorkflowTest.php index 9c6e210651..7462eec337 100644 --- a/tests/Unit/ProductionImageWorkflowTest.php +++ b/tests/Unit/ProductionImageWorkflowTest.php @@ -89,6 +89,24 @@ it('prevents the stable helper workflow from publishing an existing version', fu ->toContain('cancel-in-progress: false'); }); +it('publishes the testing host only to Docker Hub', function () { + $workflow = file_get_contents(dirname(__DIR__, 2).'/.github/workflows/coolify-testing-host.yml'); + $cleanupWorkflow = file_get_contents(dirname(__DIR__, 2).'/.github/workflows/cleanup-ghcr-untagged.yml'); + $windowsCompose = file_get_contents(dirname(__DIR__, 2).'/docker-compose.windows.yml'); + $developmentCompose = file_get_contents(dirname(__DIR__, 2).'/docker-compose.dev.yml'); + + expect($workflow) + ->toContain('DOCKER_REGISTRY: docker.io') + ->toContain('IMAGE_NAME: "coollabsio/coolify-testing-host"') + ->toContain('docker/testing-host/Dockerfile') + ->not->toContain('ghcr.io') + ->not->toContain('GITHUB_REGISTRY') + ->and($cleanupWorkflow)->not->toContain('coolify-testing-host') + ->and($windowsCompose)->toContain('docker.io/coollabsio/coolify-testing-host:latest') + ->and($developmentCompose)->toContain('image: coolify-testing-host:dev') + ->toContain('dockerfile: ./docker/testing-host/Dockerfile'); +}); + it('generates the production changelog from main', function () { $workflow = file_get_contents(dirname(__DIR__, 2).'/.github/workflows/generate-changelog.yml');