mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #15270 from 0xc0170/fix-test-github-action-git-failure
Github actions: use safe.directory for actions invoking gitpull/15268/head
commit
decc6d022c
|
@ -17,9 +17,10 @@ jobs:
|
|||
|
||||
steps:
|
||||
- name: Checkout repo
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
|
||||
-
|
||||
name: install dependencies
|
||||
|
@ -32,7 +33,7 @@ jobs:
|
|||
run: |
|
||||
set -x
|
||||
mkdir -p SCANCODE
|
||||
|
||||
git config --global --add safe.directory "$GITHUB_WORKSPACE"
|
||||
git diff --name-only --diff-filter=d origin/${GITHUB_BASE_REF} \
|
||||
| ( grep '.\(c\|cpp\|h\|hpp\|py\)$' || true )
|
||||
echo $?
|
||||
|
@ -60,13 +61,14 @@ jobs:
|
|||
|
||||
steps:
|
||||
- name: Checkout repo
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
-
|
||||
name: include check
|
||||
run: |
|
||||
git config --global --add safe.directory "$GITHUB_WORKSPACE"
|
||||
# checks mbed.h is not included in MbedOS files except in tests
|
||||
! git grep '^#include\s["'"']mbed.h['"'"]$' -- '*.c' '*.h' '*.cpp' '*.hpp' \
|
||||
':!*platform_mbed.h' ':!*TESTS/*' ':!TEST_APPS/' ':!UNITTESTS/' \
|
||||
|
@ -81,13 +83,14 @@ jobs:
|
|||
steps:
|
||||
|
||||
- name: Checkout repo
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
-
|
||||
name: UTF-8 Check
|
||||
run: |
|
||||
git config --global --add safe.directory "$GITHUB_WORKSPACE"
|
||||
# Make sure we're not introducing any text which is not UTF-8 encoded
|
||||
git diff origin/${GITHUB_BASE_REF} -U0 | ( grep -a '^+' || true ) | ( ! grep -axv '.*' )
|
||||
|
||||
|
@ -96,6 +99,7 @@ jobs:
|
|||
name: astyle checks
|
||||
run: |
|
||||
set -x
|
||||
git config --global --add safe.directory "$GITHUB_WORKSPACE"
|
||||
git diff --name-only --diff-filter=d origin/${GITHUB_BASE_REF} \
|
||||
| ( grep '.*\.\(c\|cpp\|h\|hpp\)$' || true ) \
|
||||
| ( grep -v -f .codecheckignore || true ) \
|
||||
|
@ -111,7 +115,7 @@ jobs:
|
|||
steps:
|
||||
|
||||
- name: Checkout repo
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
|
@ -155,7 +159,7 @@ jobs:
|
|||
steps:
|
||||
-
|
||||
name: Checkout repo
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
|
||||
|
||||
- uses: actions/setup-python@v2
|
||||
|
@ -184,7 +188,7 @@ jobs:
|
|||
steps:
|
||||
-
|
||||
name: Checkout repo
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
|
@ -192,6 +196,7 @@ jobs:
|
|||
name: validate pins
|
||||
run: |
|
||||
set -x
|
||||
git config --global --add safe.directory "$GITHUB_WORKSPACE"
|
||||
git diff --name-only --diff-filter=d origin/${GITHUB_BASE_REF} \
|
||||
| ( grep '.*[\\|\/]PinNames.h$' || true ) \
|
||||
| while read file; do python ./hal/tests/pinvalidate/pinvalidate.py -vvvfp "${file}"; done
|
||||
|
@ -210,7 +215,7 @@ jobs:
|
|||
steps:
|
||||
-
|
||||
name: Checkout repo
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
|
||||
-
|
||||
name: cmake build
|
||||
|
@ -237,7 +242,7 @@ jobs:
|
|||
steps:
|
||||
-
|
||||
name: Checkout repo
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
|
@ -245,6 +250,7 @@ jobs:
|
|||
name: frozen tool check
|
||||
run: |
|
||||
set -x
|
||||
git config --global --add safe.directory "$GITHUB_WORKSPACE"
|
||||
git diff --name-only origin/${GITHUB_BASE_REF} \
|
||||
| egrep \
|
||||
-e "^tools/build_api*" \
|
||||
|
|
|
@ -35,7 +35,7 @@ jobs:
|
|||
|
||||
-
|
||||
name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
|
@ -117,7 +117,7 @@ jobs:
|
|||
|
||||
-
|
||||
name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
|
||||
-
|
||||
name: Build docker containers
|
||||
|
@ -164,7 +164,7 @@ jobs:
|
|||
|
||||
-
|
||||
name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
|
||||
-
|
||||
name: Find DEV DOCKER DIGEST
|
||||
|
@ -178,7 +178,7 @@ jobs:
|
|||
# development branch of blinky
|
||||
-
|
||||
name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
repository: ARMmbed/mbed-os-example-blinky
|
||||
path: mbed-os-example-blinky
|
||||
|
|
|
@ -13,7 +13,7 @@ jobs:
|
|||
steps:
|
||||
-
|
||||
name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
|
||||
-
|
||||
name: Delete old temporary images
|
||||
|
@ -22,4 +22,4 @@ jobs:
|
|||
# deletion if only one image exists or if DOCKER_MANAGEMENT_TOKEN is not
|
||||
# setup. This shouldn't create any alarm as temporary image deletion is
|
||||
# not a critical activity.
|
||||
python ./.github/workflows/ci_scripts/ghcr_utils.py -u ${{ github.repository_owner }} -p ${{ secrets.DOCKER_MANAGEMENT_TOKEN }} delete-old-images -r mbed-os-env-tmp || true
|
||||
python ./.github/workflows/ci_scripts/ghcr_utils.py -u ${{ github.repository_owner }} -p ${{ secrets.DOCKER_MANAGEMENT_TOKEN }} delete-old-images -r mbed-os-env-tmp || true
|
||||
|
|
|
@ -24,7 +24,7 @@ jobs:
|
|||
steps:
|
||||
-
|
||||
name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
|
@ -134,7 +134,7 @@ jobs:
|
|||
|
||||
-
|
||||
name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
ref: refs/tags/${{ steps.build_info.outputs.MBED_OS_VERSION }}
|
||||
|
||||
|
@ -198,7 +198,7 @@ jobs:
|
|||
# development branch of blinky
|
||||
-
|
||||
name: Checkout example blinky
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
repository: ARMmbed/mbed-os-example-blinky
|
||||
path: mbed-os-example-blinky
|
||||
|
@ -224,7 +224,7 @@ jobs:
|
|||
|
||||
-
|
||||
name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
ref: refs/tags/${{ steps.build_info.outputs.MBED_OS_VERSION }}
|
||||
path: mbed-os-example-blinky/mbed-os
|
||||
|
|
|
@ -34,7 +34,7 @@ jobs:
|
|||
# for PR tests, development branch of blinky is used
|
||||
-
|
||||
name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
repository: ARMmbed/mbed-os-example-blinky
|
||||
path: mbed-os-example-blinky
|
||||
|
@ -49,7 +49,7 @@ jobs:
|
|||
|
||||
-
|
||||
name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
path: mbed-os-example-blinky/mbed-os
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ jobs:
|
|||
container: ghcr.io/armmbed/mbed-os-env:master-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install the latest mbed-tools
|
||||
run: |
|
||||
|
|
|
@ -8,7 +8,7 @@ jobs:
|
|||
|
||||
steps:
|
||||
- name: Checkout repo
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install Python environment
|
||||
uses: actions/setup-python@v2
|
||||
|
@ -16,7 +16,7 @@ jobs:
|
|||
python-version: 3.8
|
||||
|
||||
- name: Checkout mbed-os-scripts repo (This repo is currently private)
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
repository: ARMmbed/mbed-os-ci-scripts
|
||||
token: ${{ secrets.ISSUE_TRIAGING_PERMS }}
|
||||
|
|
|
@ -11,7 +11,7 @@ jobs:
|
|||
container: mbedos/mbed-os-env:latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
path: mbed-os
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ jobs:
|
|||
container: ghcr.io/armmbed/mbed-os-env:master-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Build the multiple_executables example
|
||||
run: |
|
||||
|
|
Loading…
Reference in New Issue