Skip to content

Commit

Permalink
fix: update GitHub Actions workflow to conditionally upload SDK artif…
Browse files Browse the repository at this point in the history
…acts and add cleanup step for non-push events (#1562)
  • Loading branch information
Junjiequan authored Dec 16, 2024
1 parent e6441a9 commit 035ac08
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion .github/workflows/upload-sdk-artifact.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
push:
branches:
- master
on:
pull_request:
branches:
- master
Expand Down Expand Up @@ -82,6 +81,17 @@ jobs:
)
- uses: actions/upload-artifact@v4
if: github.event_name == 'push'
with:
name: sdk-${{ matrix.generator }}-${{ github.sha }}
path: ./sdk

cleanup-artifacts:
runs-on: ubuntu-latest
needs:
- generate-and-upload-sdk
if: github.event_name != 'push'
steps:
- uses: geekyeggo/delete-artifact@v5
with:
name: swagger-*

0 comments on commit 035ac08

Please sign in to comment.