CI: Allow manual flathub dispatch on a non-default ref

This commit is contained in:
Ty 2025-06-30 08:46:55 -04:00
parent b557a82009
commit b94c0cc405
No known key found for this signature in database
GPG Key ID: A0C3085FE2160BCF
3 changed files with 21 additions and 2 deletions

View File

@ -4,6 +4,17 @@ on:
schedule: schedule:
- cron: "0 0 * * *" # Every day at 12am UTC. - cron: "0 0 * * *" # Every day at 12am UTC.
workflow_dispatch: # As well as manually. workflow_dispatch: # As well as manually.
inputs:
stableBuild:
description: Build and or publish to flathub stable or beta?
required: true
type: boolean
default: false
ref:
description: The git ref to build and or publish.
required: true
type: string
default: master
jobs: jobs:
@ -54,6 +65,7 @@ jobs:
cmakeflags: "" cmakeflags: ""
publish: true publish: true
fetchTags: true fetchTags: true
stableBuild: false stableBuild: ${{ inputs.stableBuild || 'false' }}
ref: ${{ inputs.ref|| 'master' }}
secrets: inherit secrets: inherit

View File

@ -39,6 +39,10 @@ on:
required: false required: false
type: boolean type: boolean
default: false default: false
ref:
required: false
type: string
default: master
jobs: jobs:
build_linux: build_linux:
@ -58,6 +62,7 @@ jobs:
# This is required for the tagging logic in generate-metainfo.sh # This is required for the tagging logic in generate-metainfo.sh
fetch-depth: 10 fetch-depth: 10
fetch-tags: true fetch-tags: true
ref: ${{ inputs.ref }}
# Work around container ownership issue # Work around container ownership issue
- name: Set Safe Directory - name: Set Safe Directory

View File

@ -114,7 +114,9 @@ jobs:
artifactPrefixName: "PCSX2-linux-Qt-x64-flatpak" artifactPrefixName: "PCSX2-linux-Qt-x64-flatpak"
compiler: clang compiler: clang
cmakeflags: "" cmakeflags: ""
publish: false # Publish if we are creating a stable release
# The flathub cron job only picks up dev builds
publish: ${{ github.event_name == 'workflow_dispatch' && inputs.is_prelease == 'false' }}
fetchTags: true fetchTags: true
stableBuild: ${{ github.event_name == 'workflow_dispatch' && inputs.is_prelease == 'false' }} stableBuild: ${{ github.event_name == 'workflow_dispatch' && inputs.is_prelease == 'false' }}
secrets: inherit secrets: inherit