fix(ci): trigger deploy on main push and v* tag directly#8
Merged
Conversation
Listening on the alpha/latest mobile tags broke the deploy: release.yml pushes those tags with GITHUB_TOKEN, and a tag pushed by a workflow does not trigger other workflows (GitHub anti-loop rule), so deploy.yml never ran after the PR #6 merge. Trigger on the original user pushes instead. Ternary on github.ref_type picks the script: tag push -> prod (light-process), branch push -> staging (light-process-test). No polling, no chain, 13 lines. The alpha/latest mobile tags stay maintained by release.yml - they are still used by consumers for `npm install github:.../light-process#alpha`. build with cc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Listening on alpha/latest mobile tags broke the deploy pipeline after PR #6: release.yml pushes those tags with
GITHUB_TOKEN, and tags pushed by a workflow do not trigger other workflows (GitHub anti-loop rule). So deploy.yml never ran.Fix
Trigger on the original user pushes instead:
push: branches: [main]-> staging (light-process-test on lp-test.enixcode.fr)push: tags: ['v*']-> prod (light-process on lp.enixcode.fr)Ternary on
github.ref_typepicks the script. No polling, no chain, 13 lines.The mobile tags
alpha/lateststay maintained by release.yml - still consumed by users for `npm install github:.../light-process#alpha`.Test plan
build with cc