Skip to content

Commit

Permalink
ci: Revert change on linux.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
jorisv committed Oct 16, 2024
1 parent 39f5f50 commit a81480d
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,19 +44,9 @@ jobs:
- name: Setup Container
run: |
apt update && DEBIAN_FRONTEND="noninteractive" apt install -y sudo lsb-release gnupg2 cmake git python3
# extract branch name or checkout devel branch for scheduled events
- name: Get branch name or checkout devel
run: |
if [ "${{ github.event_name }}" == "schedule" ]; then
echo "BRANCH_NAME=devel" >> $GITHUB_ENV
else
echo "BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_ENV
fi
- uses: actions/checkout@v4
with:
ref: ${{ env.BRANCH_NAME }}
fetch-depth: 0
submodules: recursive

- name: Setup ccache
Expand All @@ -67,6 +57,18 @@ jobs:
key: ccache-linux-${{ matrix.container }}-${{ github.sha }}
restore-keys: ccache-linux-${{ matrix.container }}-

# extract branch name
- name: Get branch name (merge)
if: github.event_name != 'pull_request'
shell: bash
run: echo "BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_ENV

# extract branch name on pull request
- name: Get branch name (pull request)
if: github.event_name == 'pull_request'
shell: bash
run: echo "BRANCH_NAME=$(echo ${GITHUB_HEAD_REF})" >> $GITHUB_ENV

# print branch name
- name: Debug
run: echo ${{ env.BRANCH_NAME }}
Expand Down

0 comments on commit a81480d

Please sign in to comment.