Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update license check and pre-commit #60

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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