-
Notifications
You must be signed in to change notification settings - Fork 0
ci(publish): build versioned release images on v* tags #60
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,6 +4,9 @@ on: | |
| push: | ||
| branches: | ||
| - main | ||
| # Version tags (e.g. v1.2.3) cut release images: :1.2.3, :1.2, :1 (and :latest). | ||
| tags: | ||
| - 'v*' | ||
| pull_request: | ||
| # `closed` is needed so we can clean up the PR image once it's merged. | ||
| types: [opened, synchronize, reopened, closed] | ||
|
|
@@ -39,10 +42,13 @@ jobs: | |
| uses: docker/metadata-action@80c7e94dd9b9319bd5eb7a0e0fe9291e23a2a2e9 # v6 | ||
| with: | ||
| images: ghcr.io/${{ github.repository }} | ||
| # main pushes -> :main ; pull requests -> :pr-<number> | ||
| # main pushes -> :main ; PRs -> :pr-<number> ; v* tags -> :1.2.3, :1.2, :1, :latest | ||
| tags: | | ||
| type=ref,event=branch | ||
| type=ref,event=pr | ||
| type=semver,pattern={{version}} | ||
| type=semver,pattern={{major}}.{{minor}} | ||
| type=semver,pattern={{major}} | ||
|
Comment on lines
+50
to
+51
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When a tag like |
||
|
|
||
| - name: Build and push backend | ||
| uses: docker/build-push-action@f9f3042f7e2789586610d6e8b85c8f03e5195baf # v7 | ||
|
|
@@ -65,6 +71,9 @@ jobs: | |
| tags: | | ||
| type=ref,event=branch | ||
| type=ref,event=pr | ||
| type=semver,pattern={{version}} | ||
| type=semver,pattern={{major}}.{{minor}} | ||
| type=semver,pattern={{major}} | ||
|
Comment on lines
+75
to
+76
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The UI image uses the same semver alias patterns, so a pre-release tag like |
||
|
|
||
| - name: Build and push UI | ||
| uses: docker/build-push-action@f9f3042f7e2789586610d6e8b85c8f03e5195baf # v7 | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This trigger matches any tag beginning with
v, but the only tag rules added for tag events are semver rules. If someone pushes a matching non-semver tag such asv1,vtest, orv2024.01.01, the workflow runs, branch and PR rules emit no tag, semver rules emit no tag, and the build-push steps run with an empty tag list.