From d9ba9d702eab677147a0d004bd1b6090ac893987 Mon Sep 17 00:00:00 2001 From: Allison Piper Date: Mon, 10 Jun 2024 17:43:59 +0000 Subject: [PATCH] Address review feedback. --- .../actions/workflow-run-job-linux/action.yml | 21 ++++++++++--------- ...rkflow-dispatch-standalone-group-linux.yml | 3 ++- .../workflow-dispatch-two-stage-linux.yml | 6 ++++-- 3 files changed, 17 insertions(+), 13 deletions(-) diff --git a/.github/actions/workflow-run-job-linux/action.yml b/.github/actions/workflow-run-job-linux/action.yml index d10d1dca2ef..55cabaa7cd6 100644 --- a/.github/actions/workflow-run-job-linux/action.yml +++ b/.github/actions/workflow-run-job-linux/action.yml @@ -18,6 +18,15 @@ description: "Run a job on a Linux runner." # ``` # Error: JavaScript Actions in Alpine containers are only supported on x64 Linux runners. Detected Linux Arm64 # ``` +# +# This action expects the repo to be already checked out in /, e.g. +# +# - name: Checkout repo +# uses: actions/checkout@v4 +# with: +# path: ${{github.event.repository.name}} +# persist-credentials: false + inputs: id: @@ -48,11 +57,6 @@ runs: # Install script dependencies apt update apt install -y --no-install-recommends tree git - - name: Checkout repo - uses: actions/checkout@v4 - with: - path: ${{github.event.repository.name}} - persist-credentials: false - name: Add NVCC problem matcher shell: bash --noprofile --norc -euo pipefail {0} run: | @@ -75,10 +79,6 @@ runs: AWS_SESSION_TOKEN: "${{env.AWS_SESSION_TOKEN}}" AWS_SECRET_ACCESS_KEY: "${{env.AWS_SECRET_ACCESS_KEY}}" run: | - echo "[host] github.workspace: ${{github.workspace}}" - echo "[container] GITHUB_WORKSPACE: ${GITHUB_WORKSPACE:-}" - echo "[container] PWD: $(pwd)" - # Necessary because we're doing docker-outside-of-docker: # Make a symlink in the container that matches the host's ${{github.workspace}}, so that way `$(pwd)` # in `.devcontainer/launch.sh` constructs volume paths relative to the hosts's ${{github.workspace}}. @@ -140,7 +140,7 @@ runs: } # Launch this container using the host's docker daemon - set -x + set -x # Print the launch.sh command-line to the log: ${{github.event.repository.name}}/.devcontainer/launch.sh \ --docker \ --cuda ${{inputs.cuda}} \ @@ -162,6 +162,7 @@ runs: --volume "$(host_path "$RUNNER_TEMP")/.aws:/root/.aws" \ --volume "$(dirname "$(dirname "${{github.workspace}}")"):/__w" \ -- /ci.sh + set +x - name: Prepare job artifacts shell: bash --noprofile --norc -euo pipefail {0} diff --git a/.github/workflows/workflow-dispatch-standalone-group-linux.yml b/.github/workflows/workflow-dispatch-standalone-group-linux.yml index e0216b7c6d9..d3dc462a48b 100644 --- a/.github/workflows/workflow-dispatch-standalone-group-linux.yml +++ b/.github/workflows/workflow-dispatch-standalone-group-linux.yml @@ -31,9 +31,10 @@ jobs: - name: Checkout repo uses: actions/checkout@v4 with: + path: ${{github.event.repository.name}} persist-credentials: false - name: Run job - uses: ./.github/actions/workflow-run-job-linux + uses: ./${{github.event.repository.name}}/.github/actions/workflow-run-job-linux with: id: ${{ matrix.id }} command: ${{ matrix.command }} diff --git a/.github/workflows/workflow-dispatch-two-stage-linux.yml b/.github/workflows/workflow-dispatch-two-stage-linux.yml index f1d9d518d3e..c1111d490a0 100644 --- a/.github/workflows/workflow-dispatch-two-stage-linux.yml +++ b/.github/workflows/workflow-dispatch-two-stage-linux.yml @@ -33,9 +33,10 @@ jobs: - name: Checkout repo uses: actions/checkout@v4 with: + path: ${{github.event.repository.name}} persist-credentials: false - name: Run job - uses: ./.github/actions/workflow-run-job-linux + uses: ./${{github.event.repository.name}}/.github/actions/workflow-run-job-linux with: id: ${{ fromJSON(inputs.producers)[0].id }} command: ${{ fromJSON(inputs.producers)[0].command }} @@ -63,9 +64,10 @@ jobs: - name: Checkout repo uses: actions/checkout@v4 with: + path: ${{github.event.repository.name}} persist-credentials: false - name: Run job - uses: ./.github/actions/workflow-run-job-linux + uses: ./${{github.event.repository.name}}/.github/actions/workflow-run-job-linux with: id: ${{ matrix.id }} command: ${{ matrix.command }}