Commit b4d8dfc
committed
feat: add branch-based versioning for PR AMI builds (#1902)
* feat: add branch-based versioning for PR AMI builds
Manually create unique Postgres version names in branch often leads to
version conflicts with the base branch versions. These conflicts force
developers to deal with manual conflict resolution and unnecessary
rebuilds.
To address this, this change implement automatic branch-based versioning
for AMI builds triggered via workflow_dispatch on non-develop and
non-release branches. The branch name is sanitized and appended to the
Postgres version string.
Example: Branch 'multi-version-ext/pg-partman' produces postgres version
'multi-version-ext-pg-partman'
* feat: add notice message for published AMI version
Display the published postgres AMI version using GitHub Actions `::notice` annotation.
* feat: run actionlint on GitHub Actions workflows
Starting to lint GitHub Actions workflows with actionlint.
* fix: generate a unique AMI version
GitHub run_id is appended to the version suffix to ensure uniqueness.
It also enables to track the AMI back to the specific workflow run that
created it using url like: https://github.com/supabase/postgres/actions/runs/<run_id>1 parent 578be5d commit b4d8dfc
File tree
3 files changed
+30
-17
lines changed- .github
- workflows
- nix
3 files changed
+30
-17
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | 70 | | |
80 | 71 | | |
81 | | - | |
82 | | - | |
| 72 | + | |
| 73 | + | |
83 | 74 | | |
84 | 75 | | |
85 | 76 | | |
86 | | - | |
87 | | - | |
88 | | - | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
89 | 85 | | |
90 | 86 | | |
91 | 87 | | |
| |||
110 | 106 | | |
111 | 107 | | |
112 | 108 | | |
113 | | - | |
114 | | - | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
115 | 112 | | |
116 | 113 | | |
117 | 114 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
2 | 6 | | |
3 | 7 | | |
4 | 8 | | |
| |||
8 | 12 | | |
9 | 13 | | |
10 | 14 | | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
11 | 21 | | |
12 | 22 | | |
13 | 23 | | |
| 24 | + | |
| 25 | + | |
14 | 26 | | |
15 | 27 | | |
16 | 28 | | |
| |||
0 commit comments