Skip to content

Commit

Permalink
support rerunning failed steps
Browse files Browse the repository at this point in the history
before, the reran step would fail to upload its cache in the end
because a prior failed run already stored the cache key.
  • Loading branch information
v4hn committed Sep 10, 2024
1 parent 9b279c1 commit 42f6b34
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/debs-from-repos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,16 @@ jobs:
uses: actions/cache/restore@v4
with:
path: /home/runner/apt_repo
key: apt-repo-${{ env.DEB_DISTRO }}-${{ env.ROS_DISTRO }}-${{ inputs.depends }}-${{ github.sha }}-${{ github.run_id }}
fail-on-cache-miss: true
key: apt-repo-${{ env.DEB_DISTRO }}-${{ env.ROS_DISTRO }}-${{ inputs.depends }}-${{ github.sha }}-${{ github.run_id }}-${{ github.run_attempt }}
restore-keys: |
apt-repo-${{ env.DEB_DISTRO }}-${{ env.ROS_DISTRO }}-${{ inputs.depends }}-${{ github.sha }}-${{ github.run_id }}
- name: Verify cache
if: ${{ inputs.depends }}
run: |
if [ -z "${{ steps.depends-cache.outputs.cache-hit }}" ]; then
echo "Cache not found"
exit 1
fi
- name: Use ccache
uses: actions/cache/restore@v4
with:
Expand Down Expand Up @@ -69,4 +77,4 @@ jobs:
if: always()
with:
path: /home/runner/apt_repo
key: apt-repo-${{ env.DEB_DISTRO }}-${{ env.ROS_DISTRO }}-${{ inputs.repos }}-${{ github.sha }}-${{ github.run_id }}
key: apt-repo-${{ env.DEB_DISTRO }}-${{ env.ROS_DISTRO }}-${{ inputs.repos }}-${{ github.sha }}-${{ github.run_id }}-${{ github.run_attempt }}

0 comments on commit 42f6b34

Please sign in to comment.