Skip to content

Commit

Permalink
feat(ci): upload components with --dry-run in PRs
Browse files Browse the repository at this point in the history
  • Loading branch information
igrr committed Sep 18, 2023
1 parent 29d3182 commit c02776c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/upload_component.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
name: Push components to Espressif Component Service

on:
# For pull requests: perform upload with "--dry-run" argument,
# i.e. validate that the component passes all checks for being uploaded.
pull_request:

# For pushes to master: actually upload the components to the registry.
push:
branches:
- master
Expand All @@ -12,6 +17,8 @@ jobs:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
- run: |
echo "${{ github.ref_name != 'master' && 'Checking' || 'Uploading' }} components"
- name: Upload components to component service
uses: espressif/upload-components-ci-action@v1
with:
Expand Down Expand Up @@ -65,4 +72,7 @@ jobs:
zlib;
libpng;
namespace: "espressif"
# API token will only be available in the master branch.
# However, dry-run doesn't require a valid token.
api_token: ${{ secrets.IDF_COMPONENT_API_TOKEN }}
dry_run: ${{ github.ref_name != 'master' }}

0 comments on commit c02776c

Please sign in to comment.