Skip to content

Lint CI fix (#518) #1290

Lint CI fix (#518)

Lint CI fix (#518) #1290

Workflow file for this run

name: Cppcheck
on:
push:
branches:
- '*'
pull_request:
branches:
- '*'
env:
PACKAGE_NAME: aws-iot-device-client
ECR_BASE_REPO: aws-iot-device-client/aws-iot-device-client-base-images
permissions:
id-token: write
contents: read
jobs:
cppcheck:
runs-on: ubuntu-latest
if: (github.event_name == 'push') || ((github.event_name == 'pull_request') && (github.event.pull_request.head.repo.full_name != github.repository))
steps:
- name: Configure AWS credentials using OIDC
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: arn:aws:iam::${{ secrets.DC_AWS_ACCOUNT_ID }}:role/GitHubActionsOIDCRole
aws-region: us-east-1
- name: Login to ECR
run: aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws
- name: Checkout Sources
uses: actions/checkout@v1
- name: cppcheck script
run: |
export DOCKER_IMAGE=public.ecr.aws/${ECR_BASE_REPO}:x86_64-amazonlinux-latest
docker pull $DOCKER_IMAGE
docker run --mount type=bind,source=$(pwd),target=/src --workdir /src --entrypoint /src/static-checks/run-cppcheck.sh $DOCKER_IMAGE