From bed1b9d4464d74a0998b1016f19649d463259664 Mon Sep 17 00:00:00 2001 From: Bhavya U Date: Mon, 8 Jul 2024 11:45:34 -0700 Subject: [PATCH] Use AzureLogin task for classifier --- .github/workflows/classifier-runner.yml | 13 +++++++++++-- .github/workflows/classifier-trainer.yml | 7 ++++++- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/.github/workflows/classifier-runner.yml b/.github/workflows/classifier-runner.yml index c653856..bf9ce61 100644 --- a/.github/workflows/classifier-runner.yml +++ b/.github/workflows/classifier-runner.yml @@ -1,4 +1,9 @@ name: "Classifier: Runner" + +permissions: + id-token: write + contents: read + on: schedule: - cron: 0 * * * * @@ -8,7 +13,13 @@ on: jobs: main: runs-on: ubuntu-latest + environment: main steps: + - uses: azure/login@v2 + with: + client-id: ${{ vars.AZURE_CLIENT_ID }} + tenant-id: ${{ vars.AZURE_TENANT_ID }} + allow-no-subscriptions: true - name: Checkout Actions uses: actions/checkout@v2 with: @@ -27,7 +38,6 @@ jobs: from: 130 until: 5 blobContainerName: vscode-remote-release-models - blobStorageKey: ${{secrets.AZURE_BLOB_STORAGE_CONNECTION_STRING}} - name: Set up Python 3.7 uses: actions/setup-python@v1 with: @@ -41,6 +51,5 @@ jobs: - name: "Run Classifier: Labeler" uses: ./actions/classifier/apply/apply-labels with: - appInsightsKey: ${{secrets.TRIAGE_ACTIONS_APP_INSIGHTS}} token: ${{secrets.VSCODE_ISSUE_TRIAGE_BOT_PAT}} config-path: classifier diff --git a/.github/workflows/classifier-trainer.yml b/.github/workflows/classifier-trainer.yml index 89238e4..0bd93e5 100644 --- a/.github/workflows/classifier-trainer.yml +++ b/.github/workflows/classifier-trainer.yml @@ -1,4 +1,9 @@ name: "Classifier: Trainer" + +permissions: + id-token: write + contents: read + on: schedule: - cron: 0 0 5 * * @@ -9,6 +14,7 @@ on: jobs: main: runs-on: ubuntu-latest + environment: main steps: - name: Checkout Actions uses: actions/checkout@v2 @@ -41,4 +47,3 @@ jobs: with: token: ${{secrets.VSCODE_ISSUE_TRIAGE_BOT_PAT}} blobContainerName: vscode-remote-release-models - blobStorageKey: ${{secrets.AZURE_BLOB_STORAGE_CONNECTION_STRING}} \ No newline at end of file