CI: login to dockerhub on aarch64 runners (#29915)
* DOCKER_HUB_LOGIN command * Add docker creds * checkout runner name * test again * Use runner.name to distinguish between buildjet and GH runners old-commit-hash: c9ec7bc2a3de1bd889d9034bd9336a4f65d36e23
This commit is contained in:
4
.github/workflows/prebuilt.yaml
vendored
4
.github/workflows/prebuilt.yaml
vendored
@@ -5,7 +5,7 @@ on:
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
DOCKER_LOGIN: docker login ghcr.io -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }}
|
||||
DOCKER_GHCR_LOGIN: docker login ghcr.io -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }}
|
||||
BUILD: selfdrive/test/docker_build.sh prebuilt
|
||||
|
||||
jobs:
|
||||
@@ -29,5 +29,5 @@ jobs:
|
||||
submodules: true
|
||||
- name: Build and Push docker image
|
||||
run: |
|
||||
$DOCKER_LOGIN
|
||||
$DOCKER_GHCR_LOGIN
|
||||
eval "$BUILD"
|
||||
|
||||
17
.github/workflows/selfdrive_tests.yaml
vendored
17
.github/workflows/selfdrive_tests.yaml
vendored
@@ -16,7 +16,8 @@ env:
|
||||
CL_BASE_IMAGE: openpilot-base-cl
|
||||
AZURE_TOKEN: ${{ secrets.AZURE_COMMADATACI_OPENPILOTCI_TOKEN }}
|
||||
|
||||
DOCKER_LOGIN: docker login ghcr.io -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }}
|
||||
DOCKER_GHCR_LOGIN: docker login ghcr.io -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }}
|
||||
DOCKER_HUB_LOGIN: docker login -u adeebshihadeh -p ${{ secrets.DOCKER_HUB_PAT }}
|
||||
BUILD: selfdrive/test/docker_build.sh base
|
||||
|
||||
RUN: docker run --shm-size 1G -v $PWD:/tmp/openpilot -w /tmp/openpilot -e PYTHONWARNINGS=error -e FILEREADER_CACHE=1 -e PYTHONPATH=/tmp/openpilot -e NUM_JOBS -e JOB_ID -e GITHUB_ACTION -e GITHUB_REF -e GITHUB_HEAD_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_RUN_ID -v $GITHUB_WORKSPACE/.ci_cache/scons_cache:/tmp/scons_cache -v $GITHUB_WORKSPACE/.ci_cache/comma_download_cache:/tmp/comma_download_cache -v $GITHUB_WORKSPACE/.ci_cache/openpilot_cache:/tmp/openpilot_cache $BASE_IMAGE /bin/sh -c
|
||||
@@ -76,6 +77,11 @@ jobs:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: true
|
||||
# login only on arm machines, due to buildjet rate limits
|
||||
- name: Setup docker
|
||||
if: contains(runner.name, 'buildjet')
|
||||
run: |
|
||||
$DOCKER_HUB_LOGIN
|
||||
- uses: ./.github/workflows/setup-with-retry
|
||||
with:
|
||||
cache_key_prefix: scons_${{ matrix.arch }}
|
||||
@@ -190,7 +196,12 @@ jobs:
|
||||
run: |
|
||||
echo "PUSH_IMAGE=true" >> "$GITHUB_ENV"
|
||||
echo "TARGET_ARCHITECTURE=${{ matrix.arch }}" >> "$GITHUB_ENV"
|
||||
$DOCKER_LOGIN
|
||||
$DOCKER_GHCR_LOGIN
|
||||
# login only on arm machines, due to buildjet rate limits
|
||||
- name: Additional setup for buildjet
|
||||
if: contains(runner.name, 'buildjet')
|
||||
run: |
|
||||
$DOCKER_HUB_LOGIN
|
||||
- uses: ./.github/workflows/setup-with-retry
|
||||
with:
|
||||
git-lfs: false
|
||||
@@ -211,7 +222,7 @@ jobs:
|
||||
submodules: false
|
||||
- name: Setup docker
|
||||
run: |
|
||||
$DOCKER_LOGIN
|
||||
$DOCKER_GHCR_LOGIN
|
||||
- name: Merge x64 and arm64 tags
|
||||
run: |
|
||||
export PUSH_IMAGE=true
|
||||
|
||||
6
.github/workflows/tools_tests.yaml
vendored
6
.github/workflows/tools_tests.yaml
vendored
@@ -13,7 +13,7 @@ concurrency:
|
||||
env:
|
||||
BASE_IMAGE: openpilot-base
|
||||
CL_BASE_IMAGE: openpilot-base-cl
|
||||
DOCKER_LOGIN: docker login ghcr.io -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }}
|
||||
DOCKER_GHCR_LOGIN: docker login ghcr.io -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
BUILD: selfdrive/test/docker_build.sh base
|
||||
|
||||
@@ -58,7 +58,7 @@ jobs:
|
||||
if: github.ref == 'refs/heads/master' && github.repository == 'commaai/openpilot'
|
||||
run: |
|
||||
echo "PUSH_IMAGE=true" >> "$GITHUB_ENV"
|
||||
$DOCKER_LOGIN
|
||||
$DOCKER_GHCR_LOGIN
|
||||
- name: Build and push sim image
|
||||
run: |
|
||||
selfdrive/test/docker_build.sh sim
|
||||
@@ -78,7 +78,7 @@ jobs:
|
||||
if: github.ref == 'refs/heads/master' && github.event_name != 'pull_request' && github.repository == 'commaai/openpilot'
|
||||
run: |
|
||||
echo "PUSH_IMAGE=true" >> "$GITHUB_ENV"
|
||||
$DOCKER_LOGIN
|
||||
$DOCKER_GHCR_LOGIN
|
||||
- name: Build and push docs image
|
||||
run: |
|
||||
selfdrive/test/docker_build.sh docs
|
||||
|
||||
Reference in New Issue
Block a user