From 5fc499b90ed5774beb6e05d5630e5ba3e0007684 Mon Sep 17 00:00:00 2001 From: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com> Date: Thu, 6 Jun 2024 13:31:45 -0300 Subject: [PATCH] ci(tools): Fix pushing python tools --- .github/workflows/build_py_tools.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build_py_tools.yml b/.github/workflows/build_py_tools.yml index d08f1781311..b5ad09bf344 100644 --- a/.github/workflows/build_py_tools.yml +++ b/.github/workflows/build_py_tools.yml @@ -20,12 +20,10 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 2 - ref: ${{ github.event.pull_request.head.ref }} - name: Verify Python Tools Changed uses: tj-actions/changed-files@v41 id: verify-changed-files with: - fetch_depth: '2' since_last_remote_commit: 'true' files: | tools/get.py @@ -72,6 +70,12 @@ jobs: DISTPATH: pytools-${{ matrix.TARGET }} PIP_EXTRA_INDEX_URL: "https://dl.espressif.com/pypi" steps: + - id: create_token + uses: tibdex/github-app-token@v2 + with: + app_id: ${{ secrets.TOOLS_UPLOAD_APP_ID }} + private_key: ${{ secrets.TOOLS_UPLOAD_APP_TOKEN }} + - name: List changed tools shell: bash run: | @@ -89,8 +93,7 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 with: - token: ${{ secrets.TOOLS_UPLOAD_PAT }} - ref: ${{ github.event.pull_request.head.ref }} + token: ${{ steps.create_token.outputs.token }} - name: Set up Python 3.8 # Skip setting python on ARM because of missing compatibility: https://github.com/actions/setup-python/issues/108 if: matrix.os != 'ARM' && matrix.os != 'ARM64'