From bd97d484c681156233e13df048de97722fe250aa Mon Sep 17 00:00:00 2001 From: Frederik Markus <80588263+frede791@users.noreply.github.com> Date: Mon, 18 Dec 2023 13:07:59 +0100 Subject: [PATCH] updates fetch depth and fix for gz fuel (#22) Signed-off-by: frederik --- .github/workflows/auto-update.yml | 19 ++++++------------- .github/workflows/sdf_parser.yml | 6 ++++-- 2 files changed, 10 insertions(+), 15 deletions(-) diff --git a/.github/workflows/auto-update.yml b/.github/workflows/auto-update.yml index d8a1e98..8acdd16 100644 --- a/.github/workflows/auto-update.yml +++ b/.github/workflows/auto-update.yml @@ -16,13 +16,6 @@ jobs: with: fetch-depth: 2 - - name: Accept OSRF software - run: | - sudo sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-stable.list' - wget http://packages.osrfoundation.org/gazebo.key -O - | sudo apt-key add - - sudo apt-get update - sudo apt-get install libgz-tools2-dev - - name: Get latest commit hash id: latest_commit run: echo "hash=$(git log --format="%H" -n 1 | tail -n 1)" >> $GITHUB_OUTPUT @@ -31,10 +24,10 @@ jobs: id: second_to_last_commit run: echo "hash=$(git log --format="%H" -n 2 | tail -n 1)" >> $GITHUB_OUTPUT - - name: Display commit hashes - run: | - echo "Latest Commit: ${{ steps.latest_commit.outputs.hash }}" - echo "Second-to-last Commit: ${{ steps.second_to_last_commit.outputs.hash }}" - - name: Update Fuel Models - run: ./fuel_upload.sh ${{ steps.second_to_last_commit.outputs.hash }} ${{ steps.latest_commit.outputs.hash }} ${{ secrets.GAZEBO_FUEL_TOKEN }} + run: | + sudo sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-stable.list' + wget http://packages.osrfoundation.org/gazebo.key -O - | sudo apt-key add - + sudo apt-get update + sudo apt-get install -y libgz-fuel-tools8-dev + ./fuel_upload.sh ${{ steps.second_to_last_commit.outputs.hash }} ${{ steps.latest_commit.outputs.hash }} ${{ secrets.GAZEBO_FUEL_TOKEN }} diff --git a/.github/workflows/sdf_parser.yml b/.github/workflows/sdf_parser.yml index 30048d6..2626848 100644 --- a/.github/workflows/sdf_parser.yml +++ b/.github/workflows/sdf_parser.yml @@ -11,7 +11,9 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 + with: + fetch-depth: 2 - name: Install packages id: install-packages @@ -20,7 +22,7 @@ jobs: sudo sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-stable.list' wget http://packages.osrfoundation.org/gazebo.key -O - | sudo apt-key add - sudo apt-get update - sudo apt install libsdformat14-dev libsdformat14 + sudo apt install -y libsdformat14-dev libsdformat14 - name: Build check_sdf id: build-check-sdf