diff --git a/.github/workflows/docker-ci.yml b/.github/workflows/docker-ci.yml index bdfeedf..e9152eb 100644 --- a/.github/workflows/docker-ci.yml +++ b/.github/workflows/docker-ci.yml @@ -48,7 +48,15 @@ jobs: cd: needs: ci - runs-on: ubuntu-22.04 + name: 'cd ${{ matrix.target }}' + strategy: + matrix: + include: + - os: ubuntu-latest + target: linux/amd64 + - os: macos-latest-xlarge + target: linux/arm64 + runs-on: ${{ matrix.os }} steps: - name: Checkout @@ -57,12 +65,6 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - - name: Login to Docker Hub - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Docker Build uses: docker/build-push-action@v5 with: @@ -73,6 +75,12 @@ jobs: cache-to: type=gha,mode=max load: true + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Docker Push if: github.event_name == 'push' && github.ref == 'refs/heads/main' uses: docker/build-push-action@v5 @@ -93,4 +101,4 @@ jobs: tags: | doseiai/dosei doseiai/dosei:${{ github.ref_name }} - cache-from: type=gha \ No newline at end of file + cache-from: type=gha