Chore/add sensor combined #84
Workflow file for this run
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: Build and push docker image | |
| on: | |
| push: | |
| branches: | |
| - 'main' | |
| pull_request: | |
| branches: | |
| - 'main' | |
| jobs: | |
| build_arch_images: | |
| name: Building ${{ matrix.arch }} Image | |
| permissions: | |
| contents: read | |
| strategy: | |
| matrix: | |
| include: | |
| - arch: arm64 | |
| runner: arm64 | |
| - arch: amd64 | |
| runner: x64 | |
| runs-on: [runs-on,"runner=4cpu-linux-${{ matrix.runner }}","image=ubuntu24-full-${{ matrix.runner }}","run-id=${{ github.run_id }}",extras=s3-cache,disk=large] | |
| steps: | |
| - uses: runs-on/action@v1 | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Login to Docker Hub | |
| if: github.event_name == 'push' | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| with: | |
| driver: docker-container | |
| platforms: linux/${{ matrix.arch }} | |
| - name: Build and push | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| file: ./docker/Dockerfile | |
| load: false | |
| push: ${{ github.event_name == 'push' }} | |
| provenance: false | |
| platforms: linux/${{ matrix.arch }} | |
| tags: | | |
| dronecode/roscon-25-workshop:latest-${{ matrix.arch }} | |
| dronecode/roscon-25-workshop:sha-${{ github.sha }}-${{ matrix.arch }} | |
| cache-from: type=gha,version=1,scope=${{ matrix.arch }} | |
| cache-to: type=gha,version=1,mode=max,scope=${{ matrix.arch }} | |
| deploy_arch_images: | |
| name: Deploying to Registry | |
| permissions: | |
| contents: read | |
| runs-on: [runs-on,"runner=1cpu-linux-x64","image=ubuntu24-full-x64","run-id=${{ github.run_id }}",extras=s3-cache] | |
| needs: [build_arch_images] | |
| if: github.event_name == 'push' | |
| steps: | |
| - uses: runs-on/action@v1 | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Login to Docker Hub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Verify Images Exist Before Creating Manifest | |
| run: | | |
| docker manifest inspect dronecode/roscon-25-workshop:latest-arm64 || echo "⚠️ Warning: No ARM64 image found!" | |
| docker manifest inspect dronecode/roscon-25-workshop:latest-amd64 || echo "⚠️ Warning: No AMD64 image found!" | |
| - name: Create and Push Multi-Arch Manifest for Docker Hub | |
| run: | | |
| docker manifest create dronecode/roscon-25-workshop:latest \ | |
| --amend dronecode/roscon-25-workshop:latest-arm64 \ | |
| --amend dronecode/roscon-25-workshop:latest-amd64 | |
| docker manifest annotate dronecode/roscon-25-workshop:latest dronecode/roscon-25-workshop:latest-arm64 --arch arm64 | |
| docker manifest annotate dronecode/roscon-25-workshop:latest dronecode/roscon-25-workshop:latest-amd64 --arch amd64 | |
| docker manifest push dronecode/roscon-25-workshop:latest | |