Skip to content

Commit

Permalink
make example workflow that calls main workflow
Browse files Browse the repository at this point in the history
example is meant to be copied to other repos

avoids having to redo the setup stuff, can handle from this repo
  • Loading branch information
Aerolfos committed Mar 25, 2024
1 parent 7ca0ced commit c29d77d
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 2 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/example.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# This is an example workflow, which you should copy to your own mod repository to create a usable action from it
# This workflow calls the reusable main workflow that handles setting up and running python

# can modify these two for labelling purposes
name: 'Deploy Stellaris mod update'

run-name: "${{ github.actor }} triggered a ${{ inputs.versionType }} update for ${{ github.event.repository.name }}"

on:
# for calling manually and getting input popups
workflow_dispatch:
inputs:
versionType:
description: 'Version type to bump, follows semantic versioning'
required: true
default: 'Patch'
type: choice
options:
- 'Major'
- 'Minor'
- 'Patch'
versionStellaris:
description: 'Stellaris version to support'
required: true
type: string
useChangelog:
description: |
Fill in changelog for release?
Expects a CHANGELOG.md file in target repo
required: true
type: boolean

permissions:
contents: write

jobs:
use_updateStellarisMod_workflow:
uses: aerolfos/stellaris_mod_deploy_action/.github/workflows/updateStellarisMod.yml@main
with:
versionType: ${{ inputs.versionType }}
versionStellaris: ${{ inputs.versionStellaris }}
useChangelog: ${{ inputs.useChangelog }}

5 changes: 3 additions & 2 deletions .github/workflows/updateStellarisMod.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# This is an example workflow, which sets up and runs python and the supporting stuff needed
# This is a reusable workflow, which sets up and runs python and the supporting stuff needed
# Call from another workflow, which will only need inputs

name: 'Deploy Stellaris mod update'
name: 'Trigger reusable workflow to deploy Stellaris mod update'

run-name: "${{ github.actor }} triggered a ${{ inputs.versionType }} update"

Expand Down

0 comments on commit c29d77d

Please sign in to comment.