Skip to content

Commit fd170e4

Browse files
authored
ci: add manual dispatch inputs and flexible build options (#17)
* ci: add inputs for manual workflow dispatch and improve build flexibility - Introduced new inputs for `workflow_dispatch` in CI, build, and release workflows, enabling manual triggering with configurable options (`branch`, `app-id`, `rebuild`, `reconcile`). - Updated workflow logic to utilize these inputs for more flexible and targeted Flatpak builds. * ci: add beta release input to workflow_dispatch - Introduced `beta` input for manual workflow dispatch to enable beta branch builds and mark releases as pre-releases. - Updated release and publish workflows to use the `beta` input for branch selection and pre-release tagging. * ci: disable Lemonade upstream bump cron schedule - Temporarily commented out the scheduled workflow as it requires an app token for rewriting pull requests and branches.
1 parent 1a388f2 commit fd170e4

4 files changed

Lines changed: 69 additions & 5 deletions

File tree

.github/workflows/build-flatpak.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,21 @@ on:
1313
required: false
1414
type: string
1515
default: "beta"
16+
app-id:
17+
description: "Rebuild only this app id."
18+
required: false
19+
type: string
20+
default: ""
21+
force-all:
22+
description: "Rebuild every app."
23+
required: false
24+
type: boolean
25+
default: false
26+
reconcile-only:
27+
description: "Reconcile index only."
28+
required: false
29+
type: boolean
30+
default: false
1631
secrets:
1732
gpg-private-key:
1833
description: "Optional GPG private key for signing flatpak repository metadata."
@@ -28,6 +43,9 @@ jobs:
2843
uses: aetherpak/actions/.github/workflows/publish.yml@v3
2944
with:
3045
branch: ${{ inputs.branch }}
46+
app: ${{ inputs.app-id }}
47+
force-all: ${{ inputs.force-all }}
48+
reconcile-only: ${{ inputs.reconcile-only }}
3149
run-linter: true
3250
upload-bundle: true
3351
dry-run: ${{ inputs.dry-run }}

.github/workflows/bump-upstream-lemonade.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
name: Bump Upstream Lemonade
22

33
on:
4-
schedule:
5-
- cron: '0 2 * * *' # Run daily at 2:00 AM UTC
4+
# Temporarily disabled as the workflow requires an app token to rewrite existing pull requests/branches.
5+
#schedule:
6+
# - cron: '0 2 * * *' # Run daily at 2:00 AM UTC
67
workflow_dispatch:
78
inputs:
89
tag:

.github/workflows/ci.yml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,23 @@ on:
55
branches: [ main ]
66
pull_request:
77
branches: [ main ]
8+
workflow_dispatch:
9+
inputs:
10+
branch:
11+
description: "Flatpak branch to use for build."
12+
required: false
13+
type: string
14+
default: "beta"
15+
app-id:
16+
description: "Verify only this app id."
17+
required: false
18+
type: string
19+
default: ""
20+
rebuild:
21+
description: "Force all apps to be rebuilt."
22+
required: false
23+
type: boolean
24+
default: false
825

926
jobs:
1027
test:
@@ -25,5 +42,7 @@ jobs:
2542
contents: read
2643
uses: ./.github/workflows/build-flatpak.yml
2744
with:
28-
branch: beta
45+
branch: ${{ inputs.branch || 'beta' }}
46+
app-id: ${{ inputs.app-id || '' }}
47+
force-all: ${{ inputs.rebuild || false }}
2948
dry-run: true

.github/workflows/release.yml

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,27 @@ name: Release
22

33
on:
44
workflow_dispatch:
5+
inputs:
6+
beta:
7+
description: "Beta release. Build the beta branch and mark the GitHub release as a pre-release."
8+
required: false
9+
type: boolean
10+
default: false
11+
app-id:
12+
description: "App id to rebuild."
13+
required: false
14+
type: string
15+
default: ""
16+
reconcile:
17+
description: "Reconcile the index against the registry."
18+
required: false
19+
type: boolean
20+
default: false
21+
rebuild:
22+
description: "Force all apps to be rebuilt."
23+
required: false
24+
type: boolean
25+
default: false
526

627
jobs:
728
create-release:
@@ -52,6 +73,7 @@ jobs:
5273
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5374
TAG_NAME: ${{ steps.calver.outputs.version }}
5475
PAGES_URL: ${{ needs.publish.outputs.pages-url }}
76+
PRERELEASE: ${{ inputs.beta }}
5577
run: |
5678
sed 's/^ //' << EOF > release_notes.md
5779
For installation instructions, please refer to the repository landing page:
@@ -60,7 +82,8 @@ jobs:
6082
6183
gh release create "$TAG_NAME" \
6284
--title "Release $TAG_NAME" \
63-
--notes-file release_notes.md
85+
--notes-file release_notes.md \
86+
--prerelease="$PRERELEASE"
6487
6588
publish:
6689
name: "Publish to Flatpak Repo"
@@ -71,7 +94,10 @@ jobs:
7194
id-token: write
7295
uses: ./.github/workflows/build-flatpak.yml
7396
with:
74-
branch: stable
97+
branch: ${{ inputs.beta && 'beta' || 'stable' }}
98+
app-id: ${{ inputs.app-id }}
99+
reconcile-only: ${{ inputs.reconcile && inputs.app-id == '' }}
100+
force-all: ${{ inputs.rebuild || (!inputs.reconcile && inputs.app-id == '') }}
75101
dry-run: false
76102
secrets:
77103
gpg-private-key: ${{ secrets.AETHERPAK_GPG_KEY }}

0 commit comments

Comments
 (0)