diff --git a/.github/workflows/auto-update.yml b/.github/workflows/auto-update.yml index de7445b..32ce0ca 100644 --- a/.github/workflows/auto-update.yml +++ b/.github/workflows/auto-update.yml @@ -21,13 +21,5 @@ jobs: 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 - - - name: Get second-to-last commit hash - id: second_to_last_commit - run: echo "hash=$((git log --format="%H" -n 2 | tail -n 1))" >> $GITHUB_OUTPUT - - 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: ./fuel_upload.sh ${{ secrets.GAZEBO_FUEL_TOKEN }} diff --git a/fuel_upload.sh b/fuel_upload.sh index 152fb15..765696e 100755 --- a/fuel_upload.sh +++ b/fuel_upload.sh @@ -1,8 +1,9 @@ #!/bin/bash -PREV=$1 -CURR=$2 -FUEL_TOKEN=$3 +FUEL_TOKEN=$1 + +PREV=$(git log --format="%H" -n 2 | tail -n 1) +CURR=$(git log --format="%H" -n 1 | tail -n 1) mod_list=$(git diff $PREV $CURR --name-status) prev_model=