Skip to content

Commit

Permalink
Update license check, version and pre-commit (#59)
Browse files Browse the repository at this point in the history
* Update license check and pre-commit

Previously both gave warnings.
Pre-commit as using Node.js 16
License check as error code was presented

Remove abandoned action

Action is no longer maintained, give Node.js warning
  • Loading branch information
erikbosch authored Jun 26, 2024
1 parent af127a9 commit ba785bc
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 13 deletions.
8 changes: 6 additions & 2 deletions src/app/workflows/gen-desired-state.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,12 @@ jobs:
sudo chmod +x /usr/bin/velocitas
velocitas init -v
- id: get_version
uses: battila7/get-version-action@v2
- name: Extract version from tag
id: get_version
run: |
VERSION=${GITHUB_REF_NAME#v}
echo Version: $VERSION
echo "version-without-v=$VERSION" >> $GITHUB_OUTPUT
- id: github-repository-name-case-adjusted
name: Prepare repository name in lower case for docker upload.
Expand Down
7 changes: 5 additions & 2 deletions src/common/workflows/check-licenses.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,12 @@ jobs:

- name: Run dash
shell: bash
continue-on-error: true
run: |
wget -O dash.jar "https://repo.eclipse.org/content/repositories/dash-licenses/org/eclipse/dash/org.eclipse.dash.licenses/1.0.2/org.eclipse.dash.licenses-1.0.2.jar"
java -jar dash.jar clearlydefined.input -summary DEPENDENCIES
java -jar dash.jar clearlydefined.input -summary DEPENDENCIES > dash.out 2>&1 || true
echo -e "Dash output: \n\`\`\` " >> $GITHUB_STEP_SUMMARY
cat dash.out >> $GITHUB_STEP_SUMMARY
echo -e "\n\`\`\`"
- name: Upload dash input/output as artifacts
uses: actions/upload-artifact@v4
Expand All @@ -71,3 +73,4 @@ jobs:
path: |
clearlydefined.input
DEPENDENCIES
dash.out
2 changes: 1 addition & 1 deletion src/cpp-app/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,4 @@ jobs:
cat code-coverage-results.md >> $GITHUB_STEP_SUMMARY
- name: Run Linters
uses: pre-commit/[email protected].0
uses: pre-commit/[email protected].1
8 changes: 6 additions & 2 deletions src/cpp-app/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,12 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- id: get_version
uses: battila7/get-version-action@v2
- name: Extract version from tag
id: get_version
run: |
VERSION=${GITHUB_REF_NAME#v}
echo Version: $VERSION
echo "version-without-v=$VERSION" >> $GITHUB_OUTPUT
- run: echo "Using VehicleApp version ${{ steps.get_version.outputs.version-without-v }} from tag"

Expand Down
2 changes: 1 addition & 1 deletion src/cpp-sdk/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,4 +107,4 @@ jobs:
# path: code-coverage-results.md

- name: Run Linters
uses: pre-commit/[email protected].0
uses: pre-commit/[email protected].1
2 changes: 1 addition & 1 deletion src/python-app/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
git config --global --add safe.directory $( pwd )
- name: Run Linters
uses: pre-commit/[email protected].0
uses: pre-commit/[email protected].1

- name: Clone Release Documentation Action repository
uses: actions/checkout@v4
Expand Down
10 changes: 7 additions & 3 deletions src/python-app/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,14 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- id: get_version
uses: battila7/get-version-action@v2
- name: Extract version from tag
id: get_version
run: |
VERSION=${GITHUB_REF_NAME#v}
echo Version: $VERSION
echo "version-without-v=$VERSION" >> $GITHUB_OUTPUT
- run: echo "Using VehicleApp version ${{ steps.get_version.outputs.version-without-v }} from tag"
- run: echo "Using VehicleApp version ${{ steps.get_version.outputs.version-without-v }} from tag"

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
Expand Down
2 changes: 1 addition & 1 deletion src/python-sdk/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
python3 -m pip install tox-gh-actions
- name: Run Linters
uses: pre-commit/[email protected].0
uses: pre-commit/[email protected].1

- name: Run the databroker binary
run: |
Expand Down

0 comments on commit ba785bc

Please sign in to comment.