feat: merge storage/sipflow/recording into recording_storage tab with… #1106
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Docker Image CI | |
| on: | |
| push: | |
| branches: ["main"] | |
| pull_request: | |
| branches: ["main"] | |
| workflow_dispatch: | |
| env: | |
| REGISTRY: ghcr.io | |
| IMAGE_NAME: restsend/rustpbx | |
| jobs: | |
| build-amd64: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Install Cross | |
| uses: taiki-e/install-action@v2 | |
| with: | |
| tool: cross | |
| - name: Build AMD64 Binaries | |
| run: | | |
| cross build --release --target x86_64-unknown-linux-gnu --features cross --bin rustpbx --bin sipflow | |
| mkdir -p bin/amd64 | |
| cp target/x86_64-unknown-linux-gnu/release/rustpbx bin/amd64/ | |
| cp target/x86_64-unknown-linux-gnu/release/sipflow bin/amd64/ | |
| - name: Upload AMD64 Binaries | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: bin-amd64 | |
| path: bin/amd64 | |
| if-no-files-found: error | |
| build-arm64: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Install Cross | |
| uses: taiki-e/install-action@v2 | |
| with: | |
| tool: cross | |
| - name: Build ARM64 Binaries | |
| run: | | |
| cross build --release --target aarch64-unknown-linux-gnu --features cross --bin rustpbx --bin sipflow | |
| mkdir -p bin/arm64 | |
| cp target/aarch64-unknown-linux-gnu/release/rustpbx bin/arm64/ | |
| cp target/aarch64-unknown-linux-gnu/release/sipflow bin/arm64/ | |
| - name: Upload ARM64 Binaries | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: bin-arm64 | |
| path: bin/arm64 | |
| if-no-files-found: error | |
| docker-image: | |
| runs-on: ubuntu-latest | |
| needs: | |
| - build-amd64 | |
| - build-arm64 | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Download AMD64 Binaries | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: bin-amd64 | |
| path: bin/amd64 | |
| - name: Download ARM64 Binaries | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: bin-arm64 | |
| path: 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: | |
| context: . | |
| platforms: linux/amd64,linux/arm64 | |
| push: ${{ github.event_name == 'workflow_dispatch' || (github.event_name == 'push' && contains(github.event.head_commit.message, '[latest]')) }} | |
| tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| provenance: false | |
| sbom: false |