diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 26dae5e7..01ba1124 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -30,7 +30,7 @@ name: Build on: workflow_run: - workflows: [Publish to DockerHub] + workflows: ["Docker"] types: [completed] concurrency: diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 663576c4..e4786fc6 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -70,6 +70,8 @@ jobs: - name: Build and export to Docker context uses: docker/build-push-action@v5 with: + build-args: | + BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ') context: . file: docker/Dockerfile load: true @@ -146,7 +148,7 @@ jobs: - name: Load Docker image run: | docker load --input ${{ steps.download.outputs.download-path }}/${{ env.DOCKER_IMAGE_ARTIFACT_NAME }} - docker image ls -a + docker inspect ${{ env.SHA_TAG }} - name: Push Docker image run: | diff --git a/docker/Dockerfile b/docker/Dockerfile index 60bc3da4..9858f8c7 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,4 +1,6 @@ ARG BASE_IMAGE='ubuntu:22.04' +ARG BUILD_DATE + FROM ${BASE_IMAGE} as base ENV TZ="America/New_York" @@ -26,7 +28,10 @@ RUN ./script/bootstrap python # ============================================================================== +# Label the build date before downloading slc to force slc to always be downloaded during a docker build + FROM base AS ot-efr32-dev +LABEL build_date=${BUILD_DATE} COPY ./script/bootstrap_silabs \ ./script/