mirror of
https://github.com/coollabsio/coolify.git
synced 2026-09-26 01:10:30 -04:00
ci(testing-host): publish image only to Docker Hub
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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 \
|
||||
|
||||
@@ -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');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user