Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: github token replace CD pat to retire the cd pat #13086

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ on:
- cron: "0 16 * * *"

permissions:
actions: read
contents: read
actions: write
contents: write

jobs:
cd:
Expand Down Expand Up @@ -61,7 +61,7 @@ jobs:
uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{ secrets.CD_PAT }}
token: ${{ secrets.GITHUB_TOKEN }}
ref: ${{ github.ref }}

- uses: actions/setup-node@v3
Expand Down Expand Up @@ -126,13 +126,13 @@ jobs:
with:
tag_name: "templates@0.0.0-rc"
env:
GITHUB_TOKEN: ${{ secrets.CD_PAT }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: release templates' RC version to github
if: ${{ (contains(steps.version-change.outputs.CHANGED, 'templates@') || contains(steps.version-change.outputs.CHANGED, '@microsoft/teamsfx')) && github.event_name == 'workflow_dispatch' && github.event.inputs.preid == 'rc' }}
uses: ncipollo/release-action@v1.10.0
with:
token: ${{ secrets.CD_PAT }}
token: ${{ secrets.GITHUB_TOKEN }}
prerelease: true
tag: "templates@0.0.0-rc"
artifacts: ${{ github.workspace }}/templates/build/*.zip
Expand All @@ -145,7 +145,7 @@ jobs:
with:
artifacts: ${{ github.workspace }}/templates/build/*.zip
name: "Release for ${{ steps.version-change.outputs.TEMPLATE_VERSION }}"
token: ${{ secrets.CD_PAT }}
token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ steps.version-change.outputs.TEMPLATE_VERSION }}
allowUpdates: true

Expand All @@ -160,7 +160,7 @@ jobs:
artifacts: ${{ runner.temp }}/template-tags.txt
name: "Template Tag List"
body: "Release to maintain template tag list."
token: ${{ secrets.CD_PAT }}
token: ${{ secrets.GITHUB_TOKEN }}
tag: "template-tag-list"
allowUpdates: true

Expand Down Expand Up @@ -287,7 +287,7 @@ jobs:
if: ${{ contains(steps.version-change.outputs.CHANGED, 'ms-teams-vscode-extension@') && github.event_name == 'workflow_dispatch' && github.event.inputs.preid == 'stable' }}
uses: ncipollo/release-action@v1.10.0
with:
token: ${{ secrets.CD_PAT }}
token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ steps.version-change.outputs.EXTENSION_VERSION }}
artifacts: ./packages/**/*.vsix
artifactErrorsFailBuild: true
Expand Down
Loading