diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index d6adff6..145daba 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -29,6 +29,17 @@ jobs: with: tool: cross + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Log in to Container registry + if: github.event_name == 'push' || github.event_name == 'workflow_dispatch' + uses: docker/login-action@v3 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Build Binaries run: | cross build --release --target x86_64-unknown-linux-gnu --features cross @@ -41,17 +52,6 @@ jobs: cp target/aarch64-unknown-linux-gnu/release/rustpbx bin/arm64/ cp target/aarch64-unknown-linux-gnu/release/sipflow bin/arm64/ - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Log in to Container registry - if: github.event_name == 'push' || github.event_name == 'workflow_dispatch' - uses: docker/login-action@v3 - with: - registry: ${{ env.REGISTRY }} - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - name: Build and push Docker image uses: docker/build-push-action@v6 with: