Skip to content

dispatch-test

dispatch-test #42

# 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
DEFAULT_BRANCH: 1.x
CURRENT_BRANCH: ${{ github.event_name != 'workflow_dispatch' && github.env.DEFAULT_BRANCH || inputs.tauriBranch }}
# 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
- name: Checkout tauri
uses: actions/checkout@v3
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