mirror of
https://github.com/infiniteCable2/openpilot.git
synced 2026-08-05 00:05:57 +08:00
CI: add docker images tagged with git commit (#29052)
* CI: add docker images tagged with git commit * tag later * debug * fix tag * test that * cleanup old-commit-hash: a83dec9d9441a0ad768494d046b5782d04fdbfc1
This commit is contained in:
@@ -21,6 +21,7 @@ jobs:
|
||||
IMAGE_NAME: openpilot-prebuilt
|
||||
steps:
|
||||
- name: Wait for green check mark
|
||||
if: ${{ github.event_name != 'workflow_dispatch' }}
|
||||
uses: lewagon/wait-on-check-action@e2558238c09778af25867eb5de5a3ce4bbae3dcd
|
||||
with:
|
||||
ref: master
|
||||
@@ -38,3 +39,5 @@ jobs:
|
||||
run: |
|
||||
$DOCKER_LOGIN
|
||||
docker push $DOCKER_REGISTRY/$IMAGE_NAME:latest
|
||||
docker tag $DOCKER_REGISTRY/$IMAGE_NAME:latest $DOCKER_REGISTRY/$IMAGE_NAME:$GITHUB_SHA
|
||||
docker push $DOCKER_REGISTRY/$IMAGE_NAME:$GITHUB_SHA
|
||||
|
||||
@@ -167,7 +167,6 @@ jobs:
|
||||
name: docker push
|
||||
runs-on: ubuntu-20.04
|
||||
if: github.ref == 'refs/heads/master' && github.event_name != 'pull_request' && github.repository == 'commaai/openpilot'
|
||||
needs: static_analysis # hack to ensure slow tests run first since this and static_analysis are fast
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
@@ -178,12 +177,16 @@ jobs:
|
||||
run: |
|
||||
$DOCKER_LOGIN
|
||||
docker push $DOCKER_REGISTRY/$BASE_IMAGE:latest
|
||||
docker tag $DOCKER_REGISTRY/$BASE_IMAGE:latest $DOCKER_REGISTRY/$BASE_IMAGE:$GITHUB_SHA
|
||||
docker push $DOCKER_REGISTRY/$BASE_IMAGE:$GITHUB_SHA
|
||||
- name: Build CL Docker image
|
||||
run: eval "$BUILD_CL"
|
||||
- name: Push to container registry
|
||||
run: |
|
||||
$DOCKER_LOGIN
|
||||
docker push $DOCKER_REGISTRY/$CL_BASE_IMAGE:latest
|
||||
docker tag $DOCKER_REGISTRY/$CL_BASE_IMAGE:latest $DOCKER_REGISTRY/$CL_BASE_IMAGE:$GITHUB_SHA
|
||||
docker push $DOCKER_REGISTRY/$CL_BASE_IMAGE:$GITHUB_SHA
|
||||
|
||||
static_analysis:
|
||||
name: static analysis
|
||||
|
||||
Reference in New Issue
Block a user