mirror of
https://github.com/stan220/flathub.git
synced 2026-09-08 18:29:08 +00:00
Drop force test parameter
This commit is contained in:
@@ -5,26 +5,17 @@ on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
git_branch:
|
||||
description: 'Git branch to build'
|
||||
description: 'Git branch or ref to build'
|
||||
required: true
|
||||
default: 'master'
|
||||
flatpak_id:
|
||||
description: 'Flatpak ID'
|
||||
required: true
|
||||
force_test:
|
||||
description: 'Force test build on master'
|
||||
required: true
|
||||
default: 'false'
|
||||
type: choice
|
||||
options:
|
||||
- 'true'
|
||||
- 'false'
|
||||
|
||||
env:
|
||||
API_URL: https://builds.flathub.org/api/pipelines
|
||||
FLATPAK_ID: ${{ github.event.inputs.flatpak_id }}
|
||||
GIT_BRANCH: ${{ github.event.inputs.git_branch }}
|
||||
FORCE_TEST: ${{ github.event.inputs.force_test }}
|
||||
GITHUB_URL: https://github.com/flathub
|
||||
|
||||
jobs:
|
||||
@@ -35,27 +26,28 @@ jobs:
|
||||
steps:
|
||||
- name: Check for existence of repo and branch
|
||||
run: |
|
||||
if [[ "$GIT_BRANCH" == refs/pull/* ]]; then
|
||||
echo "Skipping ref check for PR ref"
|
||||
else
|
||||
git -c credential.interactive=false ls-remote --heads --exit-code \
|
||||
"$GITHUB_URL"/"$FLATPAK_ID".git "$GIT_BRANCH"
|
||||
fi
|
||||
|
||||
- name: Print information
|
||||
shell: bash
|
||||
run: |
|
||||
if [ "$FORCE_TEST" == "true" ]; then
|
||||
echo -e "\n\n"
|
||||
echo "Triggering test build from master branch of $FLATPAK_ID"
|
||||
elif [ "$GIT_BRANCH" == "master" ] || [ "$GIT_BRANCH" == "beta" ] || [[ "$GIT_BRANCH" == branch/* ]]; then
|
||||
echo -e "\n\n"
|
||||
echo "Triggering official build from $GIT_BRANCH branch of $FLATPAK_ID"
|
||||
else
|
||||
echo -e "\n\n"
|
||||
echo "Triggering test build from $GIT_BRANCH of $FLATPAK_ID"
|
||||
fi
|
||||
if [ "$GIT_BRANCH" == "master" ] || [ "$GIT_BRANCH" == "beta" ] || [[ "$GIT_BRANCH" == branch/* ]]; then
|
||||
echo -e "\n\n"
|
||||
echo "Triggering official build from $GIT_BRANCH branch of $FLATPAK_ID"
|
||||
else
|
||||
echo -e "\n\n"
|
||||
echo "Triggering test build from $GIT_BRANCH of $FLATPAK_ID"
|
||||
fi
|
||||
|
||||
- name: Trigger build
|
||||
run: |
|
||||
if [ "$FORCE_TEST" == "true" ]; then
|
||||
JSON_PAYLOAD="{\"app_id\": \"$FLATPAK_ID\", \"params\": {}}"
|
||||
if [[ "$GIT_BRANCH" == refs/* ]]; then
|
||||
JSON_PAYLOAD="{\"app_id\": \"$FLATPAK_ID\", \"params\": {\"ref\": \"$GIT_BRANCH\"}}"
|
||||
else
|
||||
JSON_PAYLOAD="{\"app_id\": \"$FLATPAK_ID\", \"params\": {\"ref\": \"refs/heads/$GIT_BRANCH\"}}"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user