-
-
Notifications
You must be signed in to change notification settings - Fork 10
62 lines (59 loc) · 2.08 KB
/
action_trust-token.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
50
51
52
53
54
55
56
57
58
59
60
61
62
name: "[action] iCloud API trust token acquisition"
# If the MFA token stored in the secrets of this repository expires, this workflow can be executed manually in order to acquire a new token.
# Use the 'acquire-trust-token.sh' script, located in the .github directory to run this action
on:
workflow_dispatch:
inputs:
wg-endpoint:
description: The endpoint of the wireguard server
required: true
type: string
wg-peer-public-key:
description: The wireguard peer's public key
required: true
type: string
wg-local-address:
description: The IP address to assign to the runner
required: true
type: string
wg-remote-address:
description: The IP address of the peer
required: true
type: string
wg-allowed-ips:
description: The IPs to route through the wireguard tunnel
required: true
type: string
wg-private-key:
description: The private key for the runner
required: true
type: string
wg-preshared-key:
description: The preshared key
required: true
type: string
permissions: write-all
jobs:
acquire-token:
name: acquire-token
runs-on: ubuntu-latest
if: github.event_name == 'workflow_dispatch'
steps:
- name: setup/checkout
uses: actions/checkout@v4
- name: setup/api-token
uses: ./.github/actions/helper/api-token-setup
with:
wg-endpoint: ${{ inputs.wg-endpoint}}
wg-peer-public-key: ${{ inputs.wg-peer-public-key }}
wg-local-address: ${{ inputs.wg-local-address }}
wg-remote-address: ${{ inputs.wg-remote-address }}
wg-allowed-ips: ${{ inputs.wg-allowed-ips }}
wg-private-key: ${{ inputs.wg-private-key }}
wg-preshared-key: ${{ inputs.wg-preshared-key }}
- name: action/api-token
uses: ./.github/actions/helper/api-token
with:
test-apple-id-user: ${{ secrets.TEST_APPLE_ID_USER }}
test-apple-id-pwd: ${{ secrets.TEST_APPLE_ID_PWD }}
gh-token: ${{ secrets.GH_SECRETS_PAT }}