Skip to content

Commit 5fc499b

Browse files
committed
ci(tools): Fix pushing python tools
1 parent cc40edb commit 5fc499b

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

.github/workflows/build_py_tools.yml

+7-4
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,10 @@ jobs:
2020
uses: actions/checkout@v4
2121
with:
2222
fetch-depth: 2
23-
ref: ${{ github.event.pull_request.head.ref }}
2423
- name: Verify Python Tools Changed
2524
uses: tj-actions/changed-files@v41
2625
id: verify-changed-files
2726
with:
28-
fetch_depth: '2'
2927
since_last_remote_commit: 'true'
3028
files: |
3129
tools/get.py
@@ -72,6 +70,12 @@ jobs:
7270
DISTPATH: pytools-${{ matrix.TARGET }}
7371
PIP_EXTRA_INDEX_URL: "https://dl.espressif.com/pypi"
7472
steps:
73+
- id: create_token
74+
uses: tibdex/github-app-token@v2
75+
with:
76+
app_id: ${{ secrets.TOOLS_UPLOAD_APP_ID }}
77+
private_key: ${{ secrets.TOOLS_UPLOAD_APP_TOKEN }}
78+
7579
- name: List changed tools
7680
shell: bash
7781
run: |
@@ -89,8 +93,7 @@ jobs:
8993
- name: Checkout repository
9094
uses: actions/checkout@v4
9195
with:
92-
token: ${{ secrets.TOOLS_UPLOAD_PAT }}
93-
ref: ${{ github.event.pull_request.head.ref }}
96+
token: ${{ steps.create_token.outputs.token }}
9497
- name: Set up Python 3.8
9598
# Skip setting python on ARM because of missing compatibility: https://github.com/actions/setup-python/issues/108
9699
if: matrix.os != 'ARM' && matrix.os != 'ARM64'

0 commit comments

Comments
 (0)