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 0b761bc commit e35b6dc
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 6 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/clang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -203,10 +203,14 @@ jobs:
- name: checkout
run: |
set -x
echo GITHUB_REF=$GITHUB_REF
echo GITHUB_HEAD_REF=$GITHUB_HEAD_REF
branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} # https://stackoverflow.com/questions/58033366
echo branch=$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
30 changes: 25 additions & 5 deletions .github/workflows/gcc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,14 @@ jobs:
- name: checkout
run: |
set -x
echo GITHUB_REF=$GITHUB_REF
echo GITHUB_HEAD_REF=$GITHUB_HEAD_REF
branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} # https://stackoverflow.com/questions/58033366
echo branch=$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 @@ -146,10 +150,14 @@ jobs:
- name: checkout
run: |
set -x
echo GITHUB_REF=$GITHUB_REF
echo GITHUB_HEAD_REF=$GITHUB_HEAD_REF
branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} # https://stackoverflow.com/questions/58033366
echo branch=$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 @@ -199,10 +207,14 @@ jobs:
- name: checkout
run: |
set -x
echo GITHUB_REF=$GITHUB_REF
echo GITHUB_HEAD_REF=$GITHUB_HEAD_REF
branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} # https://stackoverflow.com/questions/58033366
echo branch=$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 @@ -280,10 +292,14 @@ jobs:
- name: checkout
run: |
set -x
echo GITHUB_REF=$GITHUB_REF
echo GITHUB_HEAD_REF=$GITHUB_HEAD_REF
branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} # https://stackoverflow.com/questions/58033366
echo branch=$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 @@ -389,10 +405,14 @@ jobs:
- name: checkout
run: |
set -x
echo GITHUB_REF=$GITHUB_REF
echo GITHUB_HEAD_REF=$GITHUB_HEAD_REF
branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} # https://stackoverflow.com/questions/58033366
echo branch=$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 e35b6dc

Please sign in to comment.