ci: Fix upload component action in github

This commit is contained in:
Euripedes Rocha Filho
2026-07-28 13:03:23 +02:00
parent e08670365a
commit b6cd429f56
+9 -10
View File
@@ -38,7 +38,6 @@ jobs:
with: with:
components: "mqtt: ." components: "mqtt: ."
namespace: "espressif" namespace: "espressif"
api_token: ${{ secrets.IDF_COMPONENT_API_TOKEN }}
dry_run: true dry_run: true
upload_components_release: upload_components_release:
@@ -48,6 +47,9 @@ jobs:
github.ref_name == 'master' && github.ref_name == 'master' &&
needs.release-please.outputs.releases_created == 'true' needs.release-please.outputs.releases_created == 'true'
needs: [release-please] needs: [release-please]
permissions:
contents: read
id-token: write
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with: with:
@@ -55,9 +57,8 @@ jobs:
- name: Upload component to the component registry - name: Upload component to the component registry
uses: espressif/upload-components-ci-action@v2 uses: espressif/upload-components-ci-action@v2
with: with:
components: ${{ join(fromJSON(needs.release-please.outputs.paths_released), '\n') }} components: "mqtt: ."
namespace: "espressif" namespace: "espressif"
api_token: ${{ secrets.IDF_COMPONENT_API_TOKEN }}
dry_run: ${{ github.repository_owner != 'espressif' }} dry_run: ${{ github.repository_owner != 'espressif' }}
update_mirror_tags: update_mirror_tags:
@@ -70,14 +71,12 @@ jobs:
with: with:
fetch-depth: 0 fetch-depth: 0
submodules: 'false' submodules: 'false'
- name: Sync tags to Gitlab - name: Sync release commit and tags to GitLab
run: | run: |
echo "Syncing tags to Gitlab" echo "Syncing release commit and tags to GitLab"
GITLAB_URL=$(echo "${{ secrets.GITLAB_URL }}" | sed 's|https://||') git remote add gitlab https://oauth2:${{ secrets.GITLAB_TOKEN }}@${{ secrets.GITLAB_URL }}/${{ github.repository }}.git
git remote add gitlab https://oauth2:${{ secrets.GITLAB_TOKEN }}@${GITLAB_URL}/${{ github.repository }}.git git push --atomic gitlab HEAD:master --tags
git push gitlab --tags echo "Release commit and tags successfully synced to GitLab"
echo "Tags successfully synced to GitLab"