Skip to content

Commit

Permalink
ci: fix manual checkout
Browse files Browse the repository at this point in the history
  • Loading branch information
biojppm committed Aug 14, 2024
1 parent 0804759 commit 9811a45
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 5 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/clang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,14 @@ jobs:
- name: checkout
run: |
set -x
echo $GITHUB_REF
echo $GITHUB_HEAD_REF
branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} # https://stackoverflow.com/questions/58033366
echo $branch
git init -q .
git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169
git remote add origin $GITHUB_SERVER_URL/$GITHUB_REPOSITORY
git fetch origin $GITHUB_HEAD_REF
git fetch origin $branch
git reset --hard FETCH_HEAD
git submodule update --init --recursive
- run: c4core-install ${{matrix.cxx}}
Expand Down
24 changes: 20 additions & 4 deletions .github/workflows/gcc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,14 @@ jobs:
- name: checkout
run: |
set -x
echo $GITHUB_REF
echo $GITHUB_HEAD_REF
branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} # https://stackoverflow.com/questions/58033366
echo $branch
git init -q .
git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169
git remote add origin $GITHUB_SERVER_URL/$GITHUB_REPOSITORY
git fetch origin $GITHUB_HEAD_REF
git fetch origin $branch
git reset --hard FETCH_HEAD
git submodule update --init --recursive
- run: c4core-install ${{matrix.cxx}}
Expand Down Expand Up @@ -105,10 +109,14 @@ jobs:
- name: checkout
run: |
set -x
echo $GITHUB_REF
echo $GITHUB_HEAD_REF
branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} # https://stackoverflow.com/questions/58033366
echo $branch
git init -q .
git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169
git remote add origin $GITHUB_SERVER_URL/$GITHUB_REPOSITORY
git fetch origin $GITHUB_HEAD_REF
git fetch origin $branch
git reset --hard FETCH_HEAD
git submodule update --init --recursive
- run: c4core-install ${{matrix.cxx}}
Expand Down Expand Up @@ -185,10 +193,14 @@ jobs:
- name: checkout
run: |
set -x
echo $GITHUB_REF
echo $GITHUB_HEAD_REF
branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} # https://stackoverflow.com/questions/58033366
echo $branch
git init -q .
git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169
git remote add origin $GITHUB_SERVER_URL/$GITHUB_REPOSITORY
git fetch origin $GITHUB_HEAD_REF
git fetch origin $branch
git reset --hard FETCH_HEAD
git submodule update --init --recursive
- run: c4core-install ${{matrix.cxx}}
Expand Down Expand Up @@ -293,10 +305,14 @@ jobs:
- name: checkout
run: |
set -x
echo $GITHUB_REF
echo $GITHUB_HEAD_REF
branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} # https://stackoverflow.com/questions/58033366
echo $branch
git init -q .
git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169
git remote add origin $GITHUB_SERVER_URL/$GITHUB_REPOSITORY
git fetch origin $GITHUB_HEAD_REF
git fetch origin $branch
git reset --hard FETCH_HEAD
git submodule update --init --recursive
- name: install gcc-arm-linux-gnueabihf
Expand Down

0 comments on commit 9811a45

Please sign in to comment.