Skip to content

Commit

Permalink
[CWS] fix issue with force refresh in btfhub sync task (#31026)
Browse files Browse the repository at this point in the history
  • Loading branch information
paulcacheux authored Nov 13, 2024
1 parent 2215e25 commit bd103eb
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/cws-btfhub-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,18 @@ jobs:
echo "ARTIFACT_NAME=constants-${{ matrix.cone }}" | tr '/' '-' >> $GITHUB_OUTPUT
- name: Sync constants
if: ${{ !inputs.force_refresh }}
env:
ARTIFACT_NAME: ${{ steps.artifact-name.outputs.ARTIFACT_NAME }}
FORCE_REFRESH: ${{ inputs.force_refresh && '--force-refresh' || '' }}
run: |
inv -e security-agent.generate-btfhub-constants --archive-path=./dev/dist/archive --output-path=./"$ARTIFACT_NAME".json "$FORCE_REFRESH"
inv -e security-agent.generate-btfhub-constants --archive-path=./dev/dist/archive --output-path=./"$ARTIFACT_NAME".json
- name: Force sync constants
if: ${{ inputs.force_refresh }}
env:
ARTIFACT_NAME: ${{ steps.artifact-name.outputs.ARTIFACT_NAME }}
run: |
inv -e security-agent.generate-btfhub-constants --archive-path=./dev/dist/archive --output-path=./"$ARTIFACT_NAME".json --force-refresh
- name: Upload artifact
uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6
Expand Down

0 comments on commit bd103eb

Please sign in to comment.