Skip to content

Commit

Permalink
fixup! (wip)[actions] trigger build workflow after docker workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
lmnotran committed Jun 20, 2024
1 parent 82bf8d9 commit 342d1e5
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@
name: Build

on:
workflow_run:
workflows: [Publish to DockerHub]
types: [completed]
workflow_call:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || (github.repository == 'openthread/ot-efr32' && github.run_id) || github.ref }}
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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: |
Expand All @@ -157,3 +159,8 @@ jobs:
run: |
docker tag ${{ env.SHA_TAG }} ${{ env.LATEST_TAG }}
docker push ${{ env.LATEST_TAG }}
trigger_build:
name: Trigger Build Workflow
uses: ./.github/workflows/build.yml
needs: [publish]
5 changes: 5 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
ARG BASE_IMAGE='ubuntu:22.04'
ARG BUILD_DATE

FROM ${BASE_IMAGE} as base

ENV TZ="America/New_York"
Expand Down Expand Up @@ -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/
Expand Down

0 comments on commit 342d1e5

Please sign in to comment.