diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 1ff5d813..761f6a6f 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -2,14 +2,9 @@ name: Build firmwares on: push: - paths: - - Dockerfile - - .github/workflows/build.yaml - - manifests/**/*.yaml - branches: - - main - tags: - - '*' + +env: + REGISTRY: ghcr.io jobs: build-container: @@ -23,7 +18,7 @@ jobs: id: create-container-name run: | repository_owner=$(echo $GITHUB_REPOSITORY_OWNER | tr [:upper:] [:lower:]) - image_name="ghcr.io/$repository_owner/silabs-firmware-builder" + image_name="${{ env.REGISTRY }}/$repository_owner/silabs-firmware-builder" tag_name="${{ hashFiles('Dockerfile') }}" echo "image_name=$image_name" >> $GITHUB_OUTPUT @@ -32,7 +27,7 @@ jobs: - name: Log in to the GitHub container registry uses: docker/login-action@v2.1.0 with: - registry: ghcr.io + registry: ${{ env.REGISTRY }} username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} - name: Set up Docker Buildx @@ -103,6 +98,9 @@ jobs: - name: Build firmware run: | + # Fix `fatal: detected dubious ownership in repository at` + git config --global --add safe.directory "$GITHUB_WORKSPACE" + # Pass all SDKs as consecutive `--sdk ...` arguments sdk_args="" for sdk_dir in /gecko_sdk*; do