diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ede4a80e5..f2c4b5a33 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -158,9 +158,14 @@ jobs: if: startsWith(github.ref, 'refs/tags/v') || (github.ref == 'refs/heads/main') runs-on: ubuntu-latest steps: - - name: Checkout + - + name: Checkout uses: actions/checkout@v3 - - name: Docker meta + - + name: Set up QEMU + uses: docker/setup-qemu-action@v2 + - + name: Docker meta id: meta uses: docker/metadata-action@v4 with: @@ -173,31 +178,40 @@ jobs: type=semver,pattern={{major}}.{{minor}} type=semver,pattern={{major}} github-token: ${{ secrets.github_token }} - - name: Set up Docker Buildx + - + name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 - - name: Login to DockerHub + - + name: Login to DockerHub uses: docker/login-action@v2 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Build and export to docker + - + name: Build and export to docker uses: docker/build-push-action@v3 with: context: . load: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} - - name: "Test docker image 'latest'" - run: | - docker run --rm solidproject/community-server:latest --version - - name: "Test docker image 'edge'" + - + name: "Test docker image 'edge'" + if: github.ref == 'refs/heads/main' run: | docker run --rm solidproject/community-server:edge --version - - name: Build and push + - + name: "Test docker image 'latest'" + if: startsWith(github.ref, 'refs/tags/v') + run: | + docker run --rm solidproject/community-server:latest --version + - + name: Build and push uses: docker/build-push-action@v3 with: context: . push: true + platforms: linux/amd64,linux/arm64 tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} @@ -212,11 +226,16 @@ jobs: if: startsWith(github.ref, 'refs/heads/versions/') runs-on: ubuntu-latest steps: - - name: Checkout + - + name: Checkout uses: actions/checkout@v3 with: ref: ${{ github.ref }} - - name: Docker meta + - + name: Set up QEMU + uses: docker/setup-qemu-action@v2 + - + name: Docker meta id: meta uses: docker/metadata-action@v4 with: @@ -226,28 +245,34 @@ jobs: tags: | type=raw,value=next github-token: ${{ secrets.github_token }} - - name: Set up Docker Buildx + - + name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 - - name: Login to DockerHub + - + name: Login to DockerHub uses: docker/login-action@v2 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Build and export to docker + - + name: Build and export to docker uses: docker/build-push-action@v3 with: context: . load: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} - - name: "Test docker image 'next'" + - + name: "Test docker image 'next'" run: | docker run --rm solidproject/community-server:next --version - - name: Build and push + - + name: Build and push uses: docker/build-push-action@v3 with: context: . push: true + platforms: linux/amd64,linux/arm64 tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }}