diff --git a/.github/workflows/docker-buildops.yml b/.github/workflows/docker-buildops.yml index 4eddbc4..47e2a96 100644 --- a/.github/workflows/docker-buildops.yml +++ b/.github/workflows/docker-buildops.yml @@ -42,6 +42,12 @@ jobs: # Login against a Docker registry except on PR # https://github.com/docker/login-action + - name: Sign in to GitLab Dependency Proxy + uses: docker/login-action@v3 + with: + registry: mau.dev + username: ${{ steps.dotenvx.outputs.GLCR_MAUDEV_BOT_USERNAME }} + password: ${{ steps.dotenvx.outputs.GLCR_MAUDEV_BOT_PASSWORD }} - name: Log into Docker Hub uses: docker/login-action@v3 with: @@ -150,6 +156,12 @@ jobs: # Login against a Docker registry except on PR # https://github.com/docker/login-action + - name: Sign in to GitLab Dependency Proxy + uses: docker/login-action@v3 + with: + registry: mau.dev + username: ${{ steps.dotenvx.outputs.GLCR_MAUDEV_BOT_USERNAME }} + password: ${{ steps.dotenvx.outputs.GLCR_MAUDEV_BOT_PASSWORD }} - name: Log into Docker Hub uses: docker/login-action@v3 with: @@ -227,97 +239,6 @@ jobs: subject-name: index.docker.io/ajhalili2006/devenv-base subject-digest: ${{ steps.build.outputs.digest }} push-to-registry: true - devenv-cloudshell: - name: "Google Cloud Shell custom image" - needs: [devenv-base] - runs-on: ubuntu-latest - continue-on-error: true - steps: - - name: Maximize build space - uses: easimon/maximize-build-space@master - with: - root-reserve-mb: 512 - swap-size-mb: 1024 - remove-dotnet: 'true' - remove-android: 'true' - remove-haskell: 'true' - remove-docker-images: 'true' - remove-codeql: 'true' - - name: Check free space after cleanup - run: | - echo "Free space:" - df -h - - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Load secrets with dotenvx - uses: andreijiroh-dev/dotenvx-action@v0.3.0 - if: github.event_name != 'pull_request' - id: dotenvx - with: - path: .env.ci - key: ${{ secrets.DOTENV_PRIVATE_KEY_CI }} - - # Workaround: https://github.com/docker/build-push-action/issues/461 - - name: Setup Docker buildx - uses: docker/setup-buildx-action@v3 - with: - buildkitd-flags: --debug - - # Login against a Docker registry except on PR - # https://github.com/docker/login-action - - name: Log into GHCR - if: github.event_name != 'pull_request' - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: ${{ steps.dotenvx.outputs.GHCR_BOT_USERNAME }} - password: ${{ steps.dotenvx.outputs.GHCR_BOT_PASSWORD }} - - name: Login into GLCR on mau.dev - if: github.event_name != 'pull_request' - uses: docker/login-action@v3 - with: - registry: dock.mau.dev - username: ${{ steps.dotenvx.outputs.GLCR_MAUDEV_BOT_USERNAME }} - password: ${{ steps.dotenvx.outputs.GLCR_MAUDEV_BOT_PASSWORD }} - - # Extract metadata (tags, labels) for Docker - # https://github.com/docker/metadata-action - - name: Extract Docker metadata - id: meta - uses: docker/metadata-action@v5 - with: - images: | - ghcr.io/${{ env.IMAGE_NAME_PREFIX }}/devenv/cloudshell - dock.mau.dev/${{ env.IMAGE_NAME_PREFIX }}/devenv/cloudshell - tags: | - type=raw,value=latest,enable={{is_default_branch}} - type=sha,enable=true,priority=100,prefix=commit-,suffix=,format=long - type=schedule,pattern=nightly - type=schedule,prefix=nightly-,pattern={{date 'YYYYMMDDhhmmss'}} - type=raw,prefix=branch-,value={{branch}} - - # Build and push Docker image with Buildx (don't push on PR) - # https://github.com/docker/build-push-action - - name: Build and push Docker image - id: build - uses: docker/build-push-action@v6 - with: - context: docker/devenv/cloudshell - # workaround: https://github.com/moby/buildkit/issues/2713#issuecomment-1068540101 - push: ${{ github.event_name != 'pull_request' }} - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} - pull: true - provenance: mode=max - sbom: true - - name: Generate image attestation for GHCR - uses: actions/attest-build-provenance@v1 - with: - subject-name: ghcr.io/${{ env.IMAGE_NAME_PREFIX }}/devenv/base - subject-digest: ${{ steps.build.outputs.digest }} - push-to-registry: true pkgops-alpine: name: "Alpine Linux - aports package maintainer image" runs-on: ubuntu-latest @@ -341,6 +262,12 @@ jobs: # Login against a Docker registry except on PR # https://github.com/docker/login-action + - name: Sign in to GitLab Dependency Proxy + uses: docker/login-action@v3 + with: + registry: mau.dev + username: ${{ steps.dotenvx.outputs.GLCR_MAUDEV_BOT_USERNAME }} + password: ${{ steps.dotenvx.outputs.GLCR_MAUDEV_BOT_PASSWORD }} - name: Log into Docker Hub uses: docker/login-action@v3 with: