Skip to content

Commit

Permalink
Update license check and pre-commit
Browse files Browse the repository at this point in the history
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

Fixes #57
  • Loading branch information
erikbosch committed Jun 14, 2024
1 parent af127a9 commit 5b9f362
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 17 deletions.
9 changes: 6 additions & 3 deletions src/app/workflows/gen-desired-state.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,11 @@ jobs:
sudo chmod +x /usr/bin/velocitas
velocitas init -v
- id: get_version
uses: battila7/get-version-action@v2
- name: Extract version from tag
run: |
VERSION=${GITHUB_REF_NAME#v}
echo Version: $VERSION
echo "VERSION=$VERSION" >> $GITHUB_ENV
- id: github-repository-name-case-adjusted
name: Prepare repository name in lower case for docker upload.
Expand All @@ -53,7 +56,7 @@ jobs:
- name: "Generate desired state for ${{ inputs.app_name }}"
working-directory: ${{github.workspace}}
env:
VAPP_VERSION: ${{ steps.get_version.outputs.version-without-v }}
VAPP_VERSION: ${{ env.VERSION }}
REGISTRY: "ghcr.io/${{steps.github-repository-name-case-adjusted.outputs.lowercase}}"
run: |
velocitas exec pantaris-integration generate-desired-state -s $(echo $REGISTRY/${{ inputs.app_name }}:$VAPP_VERSION | tr '[:upper:]' '[:lower:]')
Expand Down
10 changes: 8 additions & 2 deletions src/common/workflows/check-licenses.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ on:
pull_request:
branches:
- main
push:
branches:
- main

jobs:
check-licenses:
Expand Down Expand Up @@ -58,10 +61,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 +76,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
11 changes: 7 additions & 4 deletions src/cpp-app/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,13 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

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

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
Expand Down Expand Up @@ -103,7 +106,7 @@ jobs:
env:
VAPP_IMAGE: ${{ env.APP_NAME }}-multiarch-oci-archive/${{ env.APP_NAME }}-oci-multiarch.tar
VAPP_NAME: ${{ env.APP_NAME }}
VAPP_VERSION: ${{ steps.get_version.outputs.version-without-v }}
VAPP_VERSION: ${{ env.VERSION }}
REGISTRY: "ghcr.io/${{steps.github-repository-name-case-adjusted.outputs.lowercase}}"
run: |
tag=$(echo docker://$REGISTRY/$VAPP_NAME:$VAPP_VERSION | tr '[:upper:]' '[:lower:]')
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
11 changes: 7 additions & 4 deletions src/python-app/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,13 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

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

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
Expand Down Expand Up @@ -98,7 +101,7 @@ jobs:
env:
VAPP_IMAGE: ${{ env.APP_NAME }}-multiarch-oci-archive/${{ env.APP_NAME }}-oci-multiarch.tar
VAPP_NAME: ${{ env.APP_NAME }}
VAPP_VERSION: ${{ steps.get_version.outputs.version-without-v }}
VAPP_VERSION: ${{ env.VERSION }}
REGISTRY: "ghcr.io/${{steps.github-repository-name-case-adjusted.outputs.lowercase}}"
run: |
tag=$(echo docker://$REGISTRY/$VAPP_NAME:$VAPP_VERSION | tr '[:upper:]' '[:lower:]')
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 5b9f362

Please sign in to comment.