Skip to content

build(deps): bump the dependencies group with 4 updates #2678

build(deps): bump the dependencies group with 4 updates

build(deps): bump the dependencies group with 4 updates #2678

Workflow file for this run

###############################################################
# Copyright (c) 2023 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# This program and the accompanying materials are made available under the
# terms of the Apache License, Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0.
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
# SPDX-License-Identifier: Apache-2.0
###############################################################
name: Check Dependencies
on:
push:
branches: [main]
paths:
# all csproj files which include the external packages
- '**.csproj'
# dependencies file
- 'DEPENDENCIES'
# workflow file
- '.github/workflows/dependencies.yaml'
pull_request:
types: [opened, synchronize, reopened]
paths:
# all csproj files which include the external packages
- '**.csproj'
# dependencies file
- 'DEPENDENCIES'
# workflow file
- '.github/workflows/dependencies.yaml'
workflow_dispatch:
jobs:
check-dependencies:
runs-on: ubuntu-latest
strategy:
matrix:
# change to preview .NET 9 until fix for https://github.com/NuGet/Home/issues/12954 gets released for .NET 8
dotnet-version: ['9.0']
steps:
- name: Set up JDK 17
uses: actions/setup-java@7a6d8a8234af8eb26422e24e3006232cccaa061b # v4.6.0
with:
distribution: 'temurin'
java-version: '17'
- name: Setup .NET Core SDK ${{ matrix.dotnet-version }}
uses: actions/setup-dotnet@3e891b0cb619bf60e2c25674b222b8940e2c1c25 # v4.1.0
with:
dotnet-version: ${{ matrix.dotnet-version }}
# change to preview .NET 9 until fix for https://github.com/NuGet/Home/issues/12954 gets released for .NET 8
dotnet-quality: 'preview'
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Install dependencies
run: dotnet restore src
- name: List packages
run: dotnet list src package --include-transitive --interactive | grep ">" | grep -Pv "\s(Org|Microsoft|NuGet|System|runtime|docker|Docker|NETStandard)" | sed -E -e "s/\s+> ([a-zA-Z\.\-]+).+\s([0-9]+\.[0-9]+\.[0-9]+)\s*/nuget\/nuget\/\-\/\1\/\2/g" | awk '!seen[$0]++' > PACKAGES
- name: Generate Dependencies file
run: java -jar ./scripts/download/org.eclipse.dash.licenses-1.1.1.jar PACKAGES -project automotive.tractusx -summary DEPENDENCIES || true
- name: Check if dependencies were changed
id: dependencies-changed
run: |
changed=$(git diff DEPENDENCIES)
if [[ -n "$changed" ]]; then
echo "dependencies changed"
echo "changed=true" >> $GITHUB_OUTPUT
else
echo "dependencies not changed"
echo "changed=false" >> $GITHUB_OUTPUT
fi
- name: Check for restricted dependencies
run: |
restricted=$(grep ' restricted,' DEPENDENCIES || true)
if [[ -n "$restricted" ]]; then
echo "The following dependencies are restricted: $restricted"
exit 1
fi
if: steps.dependencies-changed.outputs.changed == 'true'
- name: Upload DEPENDENCIES file
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
with:
path: DEPENDENCIES
if: steps.dependencies-changed.outputs.changed == 'true'
- name: Signal need to update DEPENDENCIES
run: |
echo "Dependencies need to be updated (updated DEPENDENCIES file has been uploaded to workflow run)"
exit 1
if: steps.dependencies-changed.outputs.changed == 'true'