-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (41 loc) · 1.46 KB
/
issue.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: Update issue
on:
workflow_dispatch:
schedule:
- cron: '* 7 * * *'
permissions:
issues: write
id-token: write
jobs:
update-issue:
name: Update issue
timeout-minutes: 15
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # Required to fetch range
- name: Install Dependencies
run: npm i -g pnpm typescript && pnpm i
- name: 'Login to Azure'
uses: azure/login@v1
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
allow-no-subscriptions: true
- name: 'Obtain fusion token'
shell: bash
run: echo "FUSION_TOKEN=$(az account get-access-token --resource '${{ secrets.AZURE_RESOURCE_ID }}' | jq '.accessToken')" >> $GITHUB_ENV
- name: 'Login to Azure'
uses: azure/login@v1
with:
client-id: ${{ secrets.AZURE_PROD_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
allow-no-subscriptions: true
- name: 'Obtain fusion token'
shell: bash
run: echo "FUSION_PROD_TOKEN=$(az account get-access-token --resource '${{ secrets.AZURE_RESOURCE_PROD_ID }}' | jq '.accessToken')" >> $GITHUB_ENV
- name: 'Update issue'
shell: bash
run: npx ts-node --esm ./github-action/src/issue.ts issue -T ${{ github.token }} -C ${{env.FUSION_TOKEN}} -F ${{env.FUSION_PROD_TOKEN}}