ci: fix manual checkout

This commit is contained in:
Joao Paulo Magalhaes
2024-08-14 10:22:14 +01:00
parent 0804759793
commit 9811a45817
2 changed files with 25 additions and 5 deletions

View File

@@ -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}}

View File

@@ -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}}
@@ -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}}
@@ -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}}
@@ -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