Skip to content
This repository was archived by the owner on Jul 18, 2025. It is now read-only.

Commit cfde51f

Browse files
committed
Only publish next tag on default branch
1 parent 380dc4f commit cfde51f

File tree

4 files changed

+12
-8
lines changed

4 files changed

+12
-8
lines changed

graphql/subscription/buildOnPush.graphql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
subscription buildOnPush {
22
Push {
33
repo {
4+
defaultBranch
45
url
56
owner
67
name

lib/events/buildOnPush.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -536,7 +536,10 @@ Failed to publish ${pj.name}
536536
);
537537
}
538538

539-
const tags = cfg.tag || ["next"];
539+
const tags = cfg.tag || [];
540+
if (ctx.data.Push[0].branch === ctx.data.Push[0].repo.defaultBranch) {
541+
tags.push("next");
542+
}
540543
for (const tag of tags) {
541544
await params.project.spawn(
542545
"npm",

package-lock.json

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"main": "node_modules/@atomist/skill/lib/function.js",
33
"dependencies": {
4-
"@atomist/skill": "0.1.0-master.20200726070009"
4+
"@atomist/skill": "0.1.1-1"
55
},
66
"devDependencies": {
77
"@google-cloud/functions-framework": "^1.6.0",

0 commit comments

Comments
 (0)