remove choice as it is not allowed in workflow_call; add validation job

This commit is contained in:
Erica Portnoy
2026-04-16 19:23:02 -07:00
parent 94d83feca3
commit 2320d1ea60
+12 -5
View File
@@ -9,11 +9,7 @@ on:
snapReleaseChannel:
description: 'snap channel to release to'
required: true
type: choice
options:
- edge
- beta
type: string
jobs:
# This job relies on credentials used to publish the Certbot snaps. This
@@ -33,6 +29,7 @@ jobs:
# info.
publish_snap:
name: Publish snap
if: ${{ inputs.snapReleaseChannel == 'edge' || inputs.snapReleaseChannel == 'beta' }}
permissions:
contents: read
runs-on:
@@ -63,6 +60,16 @@ jobs:
tools/retry.sh eval snapcraft upload --release=${{ inputs.snapReleaseChannel }} "${SNAP_FILE}"
done
shell: bash
publish_snap_invalid:
# Fail instead of silently skipping snap release
name: Fail on invalid snapReleaseChannel
if: ${{ inputs.snapReleaseChannel != 'edge' && inputs.snapReleaseChannel != 'beta' }}
runs-on:
- 'ubuntu-latest'
steps:
- name: Fail
run: exit 1
shell: bash
# The credentials used in the following jobs are for the shared
# certbotbot account on Docker Hub.
# They are located under the certbot organization settings,