-
Notifications
You must be signed in to change notification settings - Fork 5
68 lines (58 loc) · 1.93 KB
/
on-hackathon-r1-checkin.yaml
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: 'On Hackathon Checked-in'
on:
workflow_dispatch:
inputs:
team-name:
description: 'Team name'
required: true
default: ''
repository:
description: 'Repository name'
required: true
default: ''
leader:
description: 'GitHub ID for leader'
required: true
default: ''
members:
description: 'Comma-delimited GitHub IDs for members'
required: true
default: ''
permissions:
contents: read
id-token: write
issues: write
pull-requests: write
env:
AZURE_CLIENT_ID: ${{ vars.AZURE_CLIENT_ID }}
AZURE_TENANT_ID: ${{ vars.AZURE_TENANT_ID }}
AZURE_SUBSCRIPTION_ID: ${{ vars.AZURE_SUBSCRIPTION_ID }}
jobs:
team-repository:
name: Set team repository
runs-on: ubuntu-latest
steps:
- name: Check event payload
shell: pwsh
run: |
$eventPayload = '${{ toJson(github) }}'
- name: Checkout repository
uses: actions/checkout@v4
- name: Get GitHub access token
id: github-connect
shell: pwsh
run: |
$token = ./gha-scripts/Get-GitHubAccessToken.ps1 `
-AccessTokenIDs "${{ vars.ACCESS_TOKEN_IDS }}" `
-ApimBaseUrl "${{ vars.APIM_BASE_URL }}" `
-ApimApiKey "${{ secrets.APIM_SUBSCRIPTION_KEY }}"
echo "::add-mask::$token"
echo "token=$token" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf-8
- name: Set team repository
shell: pwsh
env:
GH_TOKEN: ${{ steps.github-connect.outputs.token }}
run: |
$scriptUrl = "https://raw.githubusercontent.com/hackersground-kr/operations/main/set-teamrepository/Set-TeamRepository.ps1"
Invoke-RestMethod $scriptUrl | Out-File ~/Set-TeamRepository.ps1
~/Set-TeamRepository.ps1 -RepositoryName "${{ github.event.inputs.repository }}" -TeamLeader "${{ github.event.inputs.leader }}" -TeamMembers "${{ github.event.inputs.members }}"