Skip to content

Commit

Permalink
getting latest commits in script directly
Browse files Browse the repository at this point in the history
Signed-off-by: frede791 <[email protected]>
  • Loading branch information
fredmarkus committed Nov 16, 2023
1 parent b484067 commit e58eeff
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 deletions.
10 changes: 1 addition & 9 deletions .github/workflows/auto-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
7 changes: 4 additions & 3 deletions fuel_upload.sh
Original file line number Diff line number Diff line change
@@ -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=
Expand Down

0 comments on commit e58eeff

Please sign in to comment.