Integrate frontier exploration with OM1 (#111) #175
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: Unitree Go2 ROS2 SDK Release | |
| on: | |
| push: | |
| branches: main | |
| tags: | |
| - 'v*' | |
| workflow_dispatch: | |
| jobs: | |
| build-amd64: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| image-digest: ${{ steps.build.outputs.digest }} | |
| metadata: ${{ steps.meta.outputs.json }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v5 | |
| with: | |
| submodules: 'recursive' | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v2 | |
| - name: Login to Docker Hub | |
| uses: docker/login-action@v2 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Extract metadata (tags, labels) for Docker | |
| id: meta | |
| uses: docker/metadata-action@v4 | |
| with: | |
| images: openmindagi/unitree_sdk | |
| tags: | | |
| type=semver,pattern=v{{version}},prefix=v | |
| type=semver,pattern=v{{major}}.{{minor}},prefix=v | |
| type=ref,event=branch | |
| type=sha | |
| type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }} | |
| - name: Build and push AMD64 image by digest | |
| id: build | |
| uses: docker/build-push-action@v4 | |
| with: | |
| context: . | |
| file: ./Dockerfile | |
| platforms: linux/amd64 | |
| labels: ${{ steps.meta.outputs.labels }} | |
| outputs: type=image,name=openmindagi/unitree_sdk,push-by-digest=true,name-canonical=true,push=true | |
| build-arm64: | |
| runs-on: ubuntu-22.04-arm # Your ARM64 runner | |
| outputs: | |
| image-digest: ${{ steps.build.outputs.digest }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v2 | |
| - name: Login to Docker Hub | |
| uses: docker/login-action@v2 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Extract metadata (tags, labels) for Docker | |
| id: meta | |
| uses: docker/metadata-action@v4 | |
| with: | |
| images: openmindagi/unitree_sdk | |
| tags: | | |
| type=semver,pattern={{version}},prefix=v | |
| type=semver,pattern={{major}}.{{minor}},prefix=v | |
| type=ref,event=branch | |
| type=sha | |
| type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }} | |
| - name: Build and push ARM64 image by digest | |
| id: build | |
| uses: docker/build-push-action@v4 | |
| with: | |
| context: . | |
| file: ./Dockerfile | |
| platforms: linux/arm64 | |
| labels: ${{ steps.meta.outputs.labels }} | |
| outputs: type=image,name=openmindagi/unitree_sdk,push-by-digest=true,name-canonical=true,push=true | |
| create-manifest: | |
| runs-on: ubuntu-latest | |
| needs: [build-amd64, build-arm64] | |
| steps: | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v2 | |
| - name: Login to Docker Hub | |
| uses: docker/login-action@v2 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Create manifest list and push | |
| run: | | |
| # Get the metadata from amd64 build to extract tags | |
| tags=$(echo '${{ needs.build-amd64.outputs.metadata }}' | jq -r '.tags[]') | |
| # Create manifest for each tag | |
| for tag in $tags; do | |
| echo "Creating manifest for: $tag" | |
| docker buildx imagetools create \ | |
| --tag $tag \ | |
| openmindagi/unitree_sdk@${{ needs.build-amd64.outputs.image-digest }} \ | |
| openmindagi/unitree_sdk@${{ needs.build-arm64.outputs.image-digest }} | |
| done |