Skip to content

Commit

Permalink
try to use last successful action for workflow dispatch
Browse files Browse the repository at this point in the history
  • Loading branch information
lia-viam committed Oct 31, 2024
1 parent 6e9b4d0 commit 569863b
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/conan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,24 @@ jobs:
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Get current git info
if: github.event_name == 'schedule'
id: git_info
run: |
echo "current_commit=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
echo "current_branch=$(git branch --show-current)" >> $GITHUB_OUTPUT
- name: Get last successful commit
if: github.event_name == 'schedule'
id: last_successful_commit
uses: nrwl/last-successful-commit-action@v1
with:
branch: ${{ steps.git_info.outputs.current_branch }}
workflow_id: conan.yml
- name: Cancel scheduled build with no new commits
uses: nrwl/last-successful-commit-action@v1
if: |
github.event_name == 'schedule' &&
steps.git_info.outputs.current_commit == steps.last_successful_commit.outputs.commit_hash
build_macos:
if: github.repository_owner == 'viamrobotics'
Expand Down

0 comments on commit 569863b

Please sign in to comment.