Repository navigation
test: deploy a real app with the action in CI, report failures to Slack, and move v1 on release #25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
wmadden-electric
wants to merge
10
commits into
main
Choose a base branch
from
test/e2e-deploy
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
49e00ec
test: deploy a real app with the action in CI, and report failures to…
wmadden-electric 468b369
test: sweep leftover e2e environments, bound each step, and report ca…
wmadden-electric 4b2322b
Merge main into test/e2e-deploy
wmadden-electric 94851a3
ci: move the v1 tag to each published v1.x.y release
wmadden-electric a346630
fix: address review threads on the e2e sweep, the v1 tag workflow and…
wmadden-electric 1baa711
fix: sweep only environments of finished runs, and move v1 when a pre…
wmadden-electric 602dec5
fix: move v1 to the newest release on every run, and make the sweep t…
wmadden-electric 808c718
fix: skip releases without a tag when moving v1, and re-list environm…
wmadden-electric 4e52dea
fix: keep the tag filter from stopping the step under bash -e
wmadden-electric d0e19db
ci: stop checking the npm dev tag of prisma
wmadden-electric File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| name: move major tag | ||
|
|
||
| # Workflows use the action as prisma/cloud-deploy-action@v1, so v1 must point | ||
| # at the newest v1.x.y release. Each run moves every major tag to its newest | ||
| # published release, so a run that GitHub cancels while it waits loses nothing. | ||
|
|
||
| on: | ||
| release: | ||
| # released fires for a full release, including a prerelease promoted to | ||
| # one, and never for a prerelease. | ||
| types: [released] | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: write | ||
|
|
||
| jobs: | ||
| move: | ||
| runs-on: ubuntu-latest | ||
| concurrency: | ||
| group: major-tag | ||
| cancel-in-progress: false | ||
|
wmadden-electric marked this conversation as resolved.
Resolved
|
||
| steps: | ||
| - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 | ||
| with: | ||
| fetch-depth: 0 | ||
| - name: Move each major tag to its newest published release | ||
| env: | ||
| GH_TOKEN: ${{ github.token }} | ||
| run: | | ||
| git fetch --tags --force --quiet | ||
| releases=$(gh release list --exclude-drafts --exclude-pre-releases --limit 1000 --json tagName --jq '.[].tagName' | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$' || true) | ||
| # A release can outlive its git tag; choose only among releases that have one. | ||
| releases=$(for tag in $releases; do if git rev-parse -q --verify "refs/tags/$tag" >/dev/null; then echo "$tag"; fi; done) | ||
| if [ -z "$releases" ]; then | ||
| echo "::error::found no published vX.Y.Z releases" | ||
| exit 1 | ||
| fi | ||
| for major in $(echo "$releases" | cut -d. -f1 | sort -u); do | ||
| newest=$(echo "$releases" | grep "^$major\." | sort -V | tail -1) | ||
| target=$(git rev-parse "refs/tags/$newest^{commit}") | ||
|
wmadden-electric marked this conversation as resolved.
Resolved
|
||
| if [ "$(git rev-parse -q --verify "refs/tags/$major^{commit}" || true)" = "$target" ]; then | ||
| echo "$major already points at $newest" | ||
| continue | ||
| fi | ||
| git tag -f "$major" "$target" | ||
| git push --force origin "refs/tags/$major" | ||
| echo "$major now points at $newest ($target)" | ||
| done | ||
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| node_modules/ | ||
| dist/ | ||
| .prisma-composer/ | ||
| .prisma/ | ||
| .alchemy/ | ||
| report.json |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| export const APP_NAME = 'cloud-deploy-action-e2e'; |
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.