diff --git a/.github/workflows/sync_release_tag.yml b/.github/workflows/sync_release_tag.yml index 8781f9de8..346548aae 100644 --- a/.github/workflows/sync_release_tag.yml +++ b/.github/workflows/sync_release_tag.yml @@ -4,23 +4,39 @@ on: workflow_dispatch: inputs: tag: - description: "Release tag from PyAEDT to sync" + description: "Release tag from PyAEDT to sync." required: true - + type: string + token: + description: "Token with permissions to create tags." + required: true + type: string + user: + description: "User value for git configuration." + required: true + type: string + email: + description: "Email value for git configuration." + required: true + type: string jobs: create-tag: runs-on: ubuntu-latest permissions: contents: write + metadata: read steps: - - name: Checkout repository # zizmor: ignore[artipacked] , credentials must be persisted in this case + - name: Checkout repository uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + with: + fetch-tags: true + token: ${{ inputs.token }} # zizmor: ignore[artipacked] , credentials should be persisted - name: Create and push tag run: | - # Configure git username & email - git config --global user.name "${{ secrets.PYANSYS_CI_BOT_USERNAME }}" - git config --global user.email "${{ secrets.PYANSYS_CI_BOT_EMAIL }}" + # Configure git username & email from inputs + git config --global user.name "${{ github.event.inputs.user }}" + git config --global user.email "${{ github.event.inputs.email }}" TAG_NAME="${{ github.event.inputs.tag }}"