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: | |
| - feat/docker_export | |
| #workflow_run: | |
| # workflows: ["Semantic Release"] | |
| # types: | |
| # - completed | |
| jobs: | |
| build-and-push: | |
| # Only run if new release from Semantic release | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v3 | |
| # Log into vortex container registry | |
| - name: Log into GitHub Container Registry | |
| uses: docker/login-action@v2 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| # Get current latest tag from the repository | |
| - name: get latest tag | |
| uses: actions-ecosystem/action-get-latest-tag@v1 | |
| id: get-latest-tag | |
| with: | |
| semver_only: true | |
| # Needed in order to use arm64 arcitechture on the runner | |
| #- name: Set up QEMU | |
| # uses: docker/setup-qemu-action@v2 | |
| - name: div | |
| run: | | |
| git submodule update --init --recursive | |
| echo "TERM=xterm" >> $GITHUB_ENV | |
| - name: Build docker images | |
| run: | | |
| ./submodules/isaac_ros_common/scripts/build_image_layers.sh -i aarch64.ros2_humble.main --no-cache | |
| - name: Get image name | |
| id: build_image | |
| run: | | |
| echo "image_name=${TARGET_IMAGE_NAME}" >> $GITHUB_OUTPUT | |
| - name: Check image name | |
| run: echo "The built image is ${{ steps.build_image.outputs.image_name }}" | |
| # Tag image | |
| #- name: Retag Docker image for GitHub Container Registry | |
| # run: | | |
| # docker tag auv-image:latest ghcr.io/${{ github.repository_owner }}/auv-image:${{ steps.get-latest-tag.outputs.tag }} | |
| # Publish to container registry | |
| #- name: Push Docker image to GitHub Container Registry | |
| # run: | | |
| # docker push ghcr.io/${{ github.repository_owner }}/auv-image:${{ steps.get-latest-tag.outputs.tag }} |