diff --git a/.github/workflows/publish-dashboard.yml b/.github/workflows/publish-dashboard.yml index 03ab8435..eb4560b7 100644 --- a/.github/workflows/publish-dashboard.yml +++ b/.github/workflows/publish-dashboard.yml @@ -1,4 +1,4 @@ -name: Publish Dashboard image to GHCR +name: Publish Dashboard image to GHCR & DockerHub on: push: @@ -10,12 +10,13 @@ on: workflow_dispatch: env: - REGISTRY: ghcr.io - IMAGE_NAME: ${{ github.repository_owner }}/exosphere-dashboard + GHCR_REGISTRY: ghcr.io + DOCKER_REGISTRY: docker.io + IMAGE_NAME: exosphere-dashboard SHA_TAG: ${{ github.sha }} jobs: - publish-image-on-ghcr: + publish-image: runs-on: ubuntu-latest if: github.repository == 'exospherehost/exospherehost' @@ -23,10 +24,6 @@ jobs: contents: read packages: write - outputs: - tags: ${{ steps.meta.outputs.tags }} - json: ${{ steps.meta.outputs.json }} - steps: - uses: actions/checkout@v4 @@ -40,51 +37,10 @@ jobs: - name: Log in to GHCR uses: docker/login-action@v3 with: - registry: ${{ env.REGISTRY }} + registry: ${{ env.GHCR_REGISTRY }} username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - - name: Generate tags & labels - id: meta - uses: docker/metadata-action@v5 - with: - images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} - tags: | - type=raw,value=beta-latest - type=sha,format=short - - - name: Build and push - uses: docker/build-push-action@v5 - with: - context: ./dashboard - push: true - platforms: linux/amd64,linux/arm64 - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} - provenance: true - sbom: true - - publish-image-on-docker: - runs-on: ubuntu-latest - if: github.repository == 'exospherehost/exospherehost' - - permissions: - contents: read - packages: write - - outputs: - tags: ${{ steps.meta.outputs.tags }} - json: ${{ steps.meta.outputs.json }} - - steps: - - uses: actions/checkout@v4 - - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - with: - platforms: arm64 - - - uses: docker/setup-buildx-action@v3 - name: Log in to Docker Hub uses: docker/login-action@v3 @@ -96,7 +52,9 @@ jobs: id: meta uses: docker/metadata-action@v5 with: - images: ${{ env.IMAGE_NAME }} + images: | + ${{ env.GHCR_REGISTRY }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }} + ${{ env.DOCKER_REGISTRY }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }} tags: | type=raw,value=beta-latest type=sha,format=short diff --git a/.github/workflows/publish-state-mangaer.yml b/.github/workflows/publish-state-mangaer.yml index b7494d5c..61ea3b9e 100644 --- a/.github/workflows/publish-state-mangaer.yml +++ b/.github/workflows/publish-state-mangaer.yml @@ -1,4 +1,4 @@ -name: Publish State Manager image to GHCR +name: Publish State Manager image to GHCR & DockerHub on: push: @@ -8,8 +8,9 @@ on: workflow_dispatch: env: - REGISTRY: ghcr.io - IMAGE_NAME: ${{ github.repository_owner }}/exosphere-state-manager + GHCR_REGISTRY: ghcr.io + DOCKER_REGISTRY: docker.io + IMAGE_NAME: exosphere-state-manager SHA_TAG: ${{ github.sha }} jobs: @@ -46,8 +47,7 @@ jobs: - name: Install dev dependencies with uv working-directory: state-manager - run: | - uv sync --group dev + run: uv sync --group dev - name: Run full test suite with coverage working-directory: state-manager @@ -69,7 +69,7 @@ jobs: name: state-manager-coverage-report fail_ci_if_error: true - publish-image-on-ghcr: + publish-image: runs-on: ubuntu-latest needs: test if: github.repository == 'exospherehost/exospherehost' @@ -77,10 +77,6 @@ jobs: permissions: contents: read packages: write - - outputs: - tags: ${{ steps.meta.outputs.tags }} - json: ${{ steps.meta.outputs.json }} steps: - uses: actions/checkout@v4 @@ -95,53 +91,10 @@ jobs: - name: Log in to GHCR uses: docker/login-action@v3 with: - registry: ${{ env.REGISTRY }} + registry: ${{ env.GHCR_REGISTRY }} username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - - name: Generate tags & labels - id: meta - uses: docker/metadata-action@v5 - with: - images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} - tags: | - type=raw, value=beta-latest - type=sha, value=${{ env.SHA_TAG }} - - - name: Build and push - uses: docker/build-push-action@v5 - with: - context: ./state-manager - push: true - platforms: linux/amd64,linux/arm64 - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} - provenance: true - sbom: true - - publish-image-on-docker-hub: - runs-on: ubuntu-latest - needs: test - if: github.repository == 'exospherehost/exospherehost' - - permissions: - contents: read - packages: write - - outputs: - tags: ${{ steps.meta.outputs.tags }} - json: ${{ steps.meta.outputs.json }} - - steps: - - uses: actions/checkout@v4 - - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - with: - platforms: arm64 - - - uses: docker/setup-buildx-action@v3 - - name: Log in to Docker Hub uses: docker/login-action@v3 with: @@ -152,10 +105,12 @@ jobs: id: meta uses: docker/metadata-action@v5 with: - images: ${{ env.IMAGE_NAME }} + images: | + ${{ env.GHCR_REGISTRY }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }} + ${{ env.DOCKER_REGISTRY }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }} tags: | - type=raw, value=beta-latest - type=sha, value=${{ env.SHA_TAG }} + type=raw,value=beta-latest + type=sha,format=short - name: Build and push uses: docker/build-push-action@v5 diff --git a/.github/workflows/release-dashboard.yml b/.github/workflows/release-dashboard.yml index ef104119..5b318740 100644 --- a/.github/workflows/release-dashboard.yml +++ b/.github/workflows/release-dashboard.yml @@ -5,12 +5,13 @@ on: types: [published] env: - REGISTRY: ghcr.io - IMAGE_NAME: ${{ github.repository_owner }}/exosphere-dashboard + GHCR_REGISTRY: ghcr.io + DOCKER_REGISTRY: docker.io + IMAGE_NAME: exosphere-dashboard SHA_TAG: ${{ github.sha }} jobs: - publish-image-on-ghcr: + publish-image: runs-on: ubuntu-latest if: github.repository == 'exospherehost/exospherehost' @@ -18,10 +19,6 @@ jobs: contents: read packages: write - outputs: - tags: ${{ steps.meta.outputs.tags }} - json: ${{ steps.meta.outputs.json }} - steps: - uses: actions/checkout@v4 @@ -39,51 +36,6 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - - name: Generate tags & labels - id: meta - uses: docker/metadata-action@v5 - with: - images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} - tags: | - type=raw,value=latest - type=semver,pattern={{version}} - type=semver,pattern={{major}}.{{minor}} - type=semver,pattern={{major}} - type=sha,format=short - - - name: Build and push - uses: docker/build-push-action@v5 - with: - context: ./dashboard - push: true - platforms: linux/amd64,linux/arm64 - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} - provenance: true - sbom: true - - publish-image-on-docker-hub: - runs-on: ubuntu-latest - if: github.repository == 'exospherehost/exospherehost' - - permissions: - contents: read - packages: write - - outputs: - tags: ${{ steps.meta.outputs.tags }} - json: ${{ steps.meta.outputs.json }} - - steps: - - uses: actions/checkout@v4 - - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - with: - platforms: arm64 - - - uses: docker/setup-buildx-action@v3 - - name: Log in to Docker Hub uses: docker/login-action@v3 with: @@ -94,7 +46,9 @@ jobs: id: meta uses: docker/metadata-action@v5 with: - images: ${{ env.IMAGE_NAME }} + images: | + ${{ env.GHCR_REGISTRY }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }} + ${{ env.DOCKER_REGISTRY }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }} tags: | type=raw,value=latest type=semver,pattern={{version}} diff --git a/.github/workflows/release-state-manager.yml b/.github/workflows/release-state-manager.yml index 120d3e5a..2b1bc858 100644 --- a/.github/workflows/release-state-manager.yml +++ b/.github/workflows/release-state-manager.yml @@ -5,8 +5,9 @@ on: types: [published] env: - REGISTRY: ghcr.io - IMAGE_NAME: ${{ github.repository_owner }}/exosphere-state-manager + GHCR_REGISTRY: ghcr.io + DOCKER_REGISTRY: docker.io + IMAGE_NAME: exosphere-state-manager SHA_TAG: ${{ github.sha }} jobs: @@ -43,8 +44,7 @@ jobs: - name: Install dev dependencies with uv working-directory: state-manager - run: | - uv sync --group dev + run: uv sync --group dev - name: Run full test suite with coverage working-directory: state-manager @@ -66,7 +66,7 @@ jobs: name: state-manager-coverage-report fail_ci_if_error: true - publish-image-on-ghcr: + publish-image: runs-on: ubuntu-latest needs: test if: github.repository == 'exospherehost/exospherehost' @@ -74,10 +74,6 @@ jobs: permissions: contents: read packages: write - - outputs: - tags: ${{ steps.meta.outputs.tags }} - json: ${{ steps.meta.outputs.json }} steps: - uses: actions/checkout@v4 @@ -92,56 +88,10 @@ jobs: - name: Log in to GHCR uses: docker/login-action@v3 with: - registry: ${{ env.REGISTRY }} + registry: ${{ env.GHCR_REGISTRY }} username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - - name: Generate tags & labels - id: meta - uses: docker/metadata-action@v5 - with: - images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} - tags: | - type=raw,value=latest - type=semver,pattern={{version}} - type=semver,pattern={{major}}.{{minor}} - type=semver,pattern={{major}} - type=sha,format=short - - - name: Build and push - uses: docker/build-push-action@v5 - with: - context: ./state-manager - push: true - platforms: linux/amd64,linux/arm64 - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} - provenance: true - sbom: true - - publish-image-on-docker: - runs-on: ubuntu-latest - needs: test - if: github.repository == 'exospherehost/exospherehost' - - permissions: - contents: read - packages: write - - outputs: - tags: ${{ steps.meta.outputs.tags }} - json: ${{ steps.meta.outputs.json }} - - steps: - - uses: actions/checkout@v4 - - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - with: - platforms: arm64 - - - uses: docker/setup-buildx-action@v3 - - name: Log in to Docker Hub uses: docker/login-action@v3 with: @@ -152,7 +102,9 @@ jobs: id: meta uses: docker/metadata-action@v5 with: - images: ${{ env.IMAGE_NAME }} + images: | + ${{ env.GHCR_REGISTRY }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }} + ${{ env.DOCKER_REGISTRY }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }} tags: | type=raw,value=latest type=semver,pattern={{version}}