forked from tauri-apps/tauri-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (49 loc) · 1.6 KB
/
trigger-workflow.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
# Copyright 2019-2022 Tauri Programme within The Commons Conservancy
# SPDX-License-Identifier: Apache-2.0
# SPDX-License-Identifier: MIT
name: update-docs-modified
on:
repository_dispatch:
types: [dispatch-test]
workflow_dispatch:
inputs:
gitName:
description: 'git name for PR'
required: false
default: 'tauri-bot'
gitEmail:
description: 'git email for PR'
required: false
default: '[email protected]'
tauriBranch:
description: 'tauri branch to pull'
required: false
jobs:
update-docs:
runs-on: ubuntu-latest
env:
# Set a variable to handle the branch
CURRENT_BRANCH: ${{ github.event_name == 'workflow_dispatch' && inputs.tauriBranch || 'origin/1.x' }}
# CURRENT_BRANCH: ${{ github.event_name == 'workflow_dispatch' && inputs.tauriBranch || github.event.client_payload.ref }}
GITHUB_CONTEXT: ${{ toJson(github) }}
steps:
- run: echo $GITHUB_CONTEXT
- run: echo $CURRENT_BRANCH
- run: echo $inputs.tauriBranch
- name: Checkout tauri
uses: actions/checkout@v4
with:
repository: vasfvitor/tauri
# here sets the branch
ref: ${{ github.env.CURRENT_BRANCH }}
# this works
#ref: ${{ inputs.tauriBranch }}
# seems like no
#ref: ${{github.event.inputs.tauriBranch}}
# origin/1.33
# ref: ${{ github.event.client_payload.ref }}
#prolly not:
# ref: ${{ github.env.CURRENT_BRANCH }}
#nope
# ref: $CURRENT_BRANCH
path: tauri