Skip to content

Commit

Permalink
Add input options for NT and workspaces
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolaSimsic committed Sep 5, 2024
1 parent 5f899b3 commit 10998b8
Showing 1 changed file with 22 additions and 6 deletions.
28 changes: 22 additions & 6 deletions .github/workflows/NativePipeline.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
name: Run Native Pipeline
on:
workflow_dispatch:
inputs:
nt_branch:
description: "Native Template branch to use (default: master)"
default: "master"
required: false
type: string

workspaces:
description: "Add comma-separated list of workspaces to run (animation-native,video-player-native, etc..)"
required: false
default: "*-native"

# schedule:
# - cron: "0 6 * * *"
Expand All @@ -23,16 +34,21 @@ jobs:
- name: "Determine scope"
id: scope
run: |
echo "Event name: '${{ github.event_name }}'"
if [ "${{ github.event_name }}" == "pull_request" ]; then
echo "scope=--since --include '*-native'" >> $GITHUB_OUTPUT
if [ "${{ github.event.inputs.workspaces }}" != "*-native" ]; then
selected_workspaces=$(echo "${{ github.event.inputs.workspaces }}" | sed 's/,/ /g')
echo "scope=--include '${selected_workspaces}' --all" >> $GITHUB_OUTPUT
else
echo "scope=--include '*-native'" >> $GITHUB_OUTPUT
if [ "${{ github.event_name }}" == "pull_request" ]; then
echo "scope=--since --include '*-native'" >> $GITHUB_OUTPUT
else
echo "scope=--include '*-native' --all" >> $GITHUB_OUTPUT
fi
fi
- name: "Debug Scope Output"
run: |
echo "Scope is: ${{ steps.scope.outputs.scope }}"
mendix-version:
runs-on: ubuntu-22.04
steps:
Expand Down Expand Up @@ -197,7 +213,7 @@ jobs:
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
with:
repository: mendix/native-template
ref: master
ref: ${{ github.event.inputs.nt_branch || 'master' }}
path: native-template
- name: "Check out code"
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
Expand Down Expand Up @@ -246,7 +262,7 @@ jobs:
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
with:
repository: mendix/native-template
ref: master
ref: ${{ github.event.inputs.nt_branch || 'master' }}
path: native-template
- name: "Check out code"
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
Expand Down

0 comments on commit 10998b8

Please sign in to comment.