Skip to content

Commit

Permalink
github actions: use canonical way to get ImageOS
Browse files Browse the repository at this point in the history
  • Loading branch information
matt335672 committed May 25, 2022
1 parent d8669a2 commit 8236cda
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,18 +132,20 @@ jobs:
CPPCHECK_VER: 2.8
CPPCHECK_REPO: https://github.com/danmar/cppcheck.git
steps:
# This is currently the only way to get a version into
# the cache tag name - see https://github.com/actions/cache/issues/543
- run: |
echo "OS_VERSION=`lsb_release -sr`" >> $GITHUB_ENV
# Set steps.os.outputs.image to the specific OS (e.g. 'ubuntu20')
# see https://github.com/actions/cache/issues/543
- name: Get operating system name and version.
id: os
run: echo "::set-output name=image::$ImageOS"
shell: bash
- uses: actions/checkout@v2
- name: Cache cppcheck
uses: actions/cache@v2
env:
cache-name: cache-cppcheck
with:
path: ~/cppcheck.local
key: ${{ runner.os }}-${{ env.OS_VERSION }}-build-${{ env.cache-name }}-${{ env.CPPCHECK_VER }}
key: ${{ steps.os.outputs.image }}-build-${{ env.cache-name }}-${{ env.CPPCHECK_VER }}
- run: sudo scripts/install_cppcheck_dependencies_with_apt.sh
- run: ./bootstrap
- run: scripts/install_cppcheck.sh $CPPCHECK_REPO $CPPCHECK_VER
Expand Down

0 comments on commit 8236cda

Please sign in to comment.