diff --git a/.github/actions/docker-build-and-push-cuda/action.yaml b/.github/actions/docker-build-and-push-cuda/action.yaml index 34099c7c9df..4894085b182 100644 --- a/.github/actions/docker-build-and-push-cuda/action.yaml +++ b/.github/actions/docker-build-and-push-cuda/action.yaml @@ -18,6 +18,19 @@ inputs: runs: using: composite steps: + - name: Install jq and vcstool + run: | + sudo apt-get -y update + sudo apt-get -y install jq python3-pip + pip install --no-cache-dir vcstool + shell: bash + + - name: Run vcs import + run: | + mkdir src + vcs import src < autoware.repos + shell: bash + - name: Setup Docker Buildx uses: docker/setup-buildx-action@v3 diff --git a/.github/workflows/docker-build-and-push-arm64.yaml b/.github/workflows/docker-build-and-push-arm64.yaml index 3be970b5234..58a8a918698 100644 --- a/.github/workflows/docker-build-and-push-arm64.yaml +++ b/.github/workflows/docker-build-and-push-arm64.yaml @@ -68,6 +68,49 @@ jobs: *.cache-to=type=registry,ref=${{ github.repository }}-buildcache:arm64-${{ github.head_ref }},mode=max dockerhub-token: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Show disk space + if: always() + run: | + df -h + + docker-build-and-push-cuda: + needs: [load-env, docker-build-and-push] + runs-on: buildjet-16vcpu-ubuntu-2204-arm + steps: + - name: Check if PR author is the specific user + id: author-check + run: | + PR_AUTHOR=$(jq -r '.pull_request.user.login' "$GITHUB_EVENT_PATH") + if [[ "$PR_AUTHOR" == "youtalk" ]]; then + echo "$PR_AUTHOR is a target user" + echo "author-found=true" >> $GITHUB_OUTPUT + else + echo "$PR_AUTHOR is not a target user" + echo "author-found=false" >> $GITHUB_OUTPUT + fi + shell: bash + + - name: Check out repository + uses: actions/checkout@v4 + + - name: Set git config + uses: autowarefoundation/autoware-github-actions/set-git-config@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} + + - name: Get changed files + id: changed-files + uses: tj-actions/changed-files@v45 + with: + files: | + *.env + *.repos + .github/actions/docker-build-and-push/action.yaml + .github/workflows/docker-build-and-push*.yaml + ansible-galaxy-requirements.yaml + ansible/** + docker/** + - name: Build 'Autoware' with CUDA if: ${{ steps.changed-files.outputs.any_changed == 'true' || github.event_name == 'workflow_dispatch' || diff --git a/.github/workflows/docker-build-and-push.yaml b/.github/workflows/docker-build-and-push.yaml index 236b246f95b..57469ee288a 100644 --- a/.github/workflows/docker-build-and-push.yaml +++ b/.github/workflows/docker-build-and-push.yaml @@ -68,6 +68,36 @@ jobs: *.cache-to=type=registry,ref=${{ github.repository }}-buildcache:amd64-${{ github.head_ref }},mode=max dockerhub-token: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Show disk space + if: always() + run: | + df -h + + docker-build-and-push-cuda: + needs: [load-env, docker-build-and-push] + runs-on: buildjet-16vcpu-ubuntu-2204 + steps: + - name: Check out repository + uses: actions/checkout@v4 + + - name: Set git config + uses: autowarefoundation/autoware-github-actions/set-git-config@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} + + - name: Get changed files + id: changed-files + uses: tj-actions/changed-files@v45 + with: + files: | + *.env + *.repos + .github/actions/docker-build-and-push/action.yaml + .github/workflows/docker-build-and-push*.yaml + ansible-galaxy-requirements.yaml + ansible/** + docker/** + - name: Build 'Autoware' with CUDA if: ${{ steps.changed-files.outputs.any_changed == 'true' || github.event_name == 'workflow_dispatch' ||