Logs workflow_dispatch input values and skips publish-test on a manual run without deploy_test checked
Continuous Integration / config (pull_request) Successful in 12s
Continuous Integration / changes (pull_request) Successful in 30s
Continuous Integration / backend-build (pull_request) Successful in 4m52s
Continuous Integration / vulnerability-scan (pull_request) Successful in 4m45s
Continuous Integration / frontend-prepare (pull_request) Successful in 1m28s
Continuous Integration / backend-test (pull_request) Successful in 5m52s
Continuous Integration / frontend-build (pull_request) Successful in 2m16s
Continuous Integration / frontend-test (pull_request) Successful in 4m23s
Continuous Integration / frontend-lint (pull_request) Successful in 1m58s
Continuous Integration / publish-production (pull_request) Skipped
Continuous Integration / deploy-production (pull_request) Skipped
Continuous Integration / publish-test (pull_request) Successful in 6m31s
Continuous Integration / deploy-test (pull_request) Skipped
Continuous Integration / config (pull_request) Successful in 12s
Continuous Integration / changes (pull_request) Successful in 30s
Continuous Integration / backend-build (pull_request) Successful in 4m52s
Continuous Integration / vulnerability-scan (pull_request) Successful in 4m45s
Continuous Integration / frontend-prepare (pull_request) Successful in 1m28s
Continuous Integration / backend-test (pull_request) Successful in 5m52s
Continuous Integration / frontend-build (pull_request) Successful in 2m16s
Continuous Integration / frontend-test (pull_request) Successful in 4m23s
Continuous Integration / frontend-lint (pull_request) Successful in 1m58s
Continuous Integration / publish-production (pull_request) Skipped
Continuous Integration / deploy-production (pull_request) Skipped
Continuous Integration / publish-test (pull_request) Successful in 6m31s
Continuous Integration / deploy-test (pull_request) Skipped
Gitea's UI has no reliable way to see a past run's dispatch input values, so the config job now echoes them into the log. publish-test previously always built and uploaded the test artifact regardless of the deploy_test/deploy_production selection, wasting a build on manual runs that were never going to deploy to test; it now mirrors publish-production by skipping when workflow_dispatch didn't check deploy_test. Push and pull_request runs are unaffected. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VhySVFARKAP89WqQ3Kff8M
This commit is contained in:
@@ -53,6 +53,13 @@ jobs:
|
||||
health_check_url_test: ${{ steps.set.outputs.health_check_url_test }}
|
||||
health_check_url_production: ${{ steps.set.outputs.health_check_url_production }}
|
||||
steps:
|
||||
# Gitea has no reliable way to see a past run's workflow_dispatch input values from the UI, so
|
||||
# this logs them explicitly — the only durable record of what was actually checked for a run.
|
||||
- name: Log dispatch inputs
|
||||
if: github.event_name == 'workflow_dispatch'
|
||||
run: |
|
||||
echo "Deploy to Test: ${{ github.event.inputs.deploy_test }}"
|
||||
echo "Deploy to Production: ${{ github.event.inputs.deploy_production }}"
|
||||
- id: set
|
||||
run: |
|
||||
echo "artifact_name_test=${{ env.ARTIFACT_NAME_TEST }}" >> "$GITHUB_OUTPUT"
|
||||
@@ -283,9 +290,11 @@ jobs:
|
||||
# its side of the repo didn't change). Gitea Actions only implements always() from the GitHub
|
||||
# Actions status-check functions — success()/failure()/cancelled() are not supported — so each
|
||||
# gate's outcome is checked explicitly via needs.<job>.result instead: a skipped gate is fine,
|
||||
# but a gate that actually ran and failed or was cancelled still blocks the publish. The final
|
||||
# but a gate that actually ran and failed or was cancelled still blocks the publish. The
|
||||
# changes.outputs check makes sure there's something to publish at all: a run that touched
|
||||
# neither backend nor frontend has nothing new to deploy.
|
||||
# neither backend nor frontend has nothing new to deploy. The final line skips this build on a
|
||||
# manual workflow_dispatch run that didn't check deploy_test — building and uploading a test
|
||||
# artifact nobody is going to deploy is wasted work; push/PR runs are unaffected.
|
||||
if: |
|
||||
always() &&
|
||||
needs.changes.result == 'success' &&
|
||||
@@ -295,7 +304,8 @@ jobs:
|
||||
needs.frontend-build.result != 'failure' && needs.frontend-build.result != 'cancelled' &&
|
||||
needs.frontend-test.result != 'failure' && needs.frontend-test.result != 'cancelled' &&
|
||||
needs.frontend-lint.result != 'failure' && needs.frontend-lint.result != 'cancelled' &&
|
||||
(needs.changes.outputs.backend == 'true' || needs.changes.outputs.frontend == 'true')
|
||||
(needs.changes.outputs.backend == 'true' || needs.changes.outputs.frontend == 'true') &&
|
||||
(github.event_name != 'workflow_dispatch' || github.event.inputs.deploy_test == 'true')
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
Reference in New Issue
Block a user