Skip to content

Commit a662261

Browse files
committed
Use GitHub Action to publish orbs
It uses circleci/circleci-cli:alpine docker image that already has CircleCI CLI installed. We use a secret with our key to publish orbs in our namespace. For now, to change the version you need to manually change the entrypoint.sh file.
1 parent 00ab75f commit a662261

File tree

3 files changed

+29
-0
lines changed

3 files changed

+29
-0
lines changed

.github/main.workflow

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
workflow "Release a new version" {
2+
on = "push"
3+
resolves = ["publish-on-orbs-registry"]
4+
}
5+
6+
action "publish-on-orbs-registry" {
7+
uses = "./publish-on-orbs-registry/"
8+
secrets = ["CIRCLECI_TOKEN"]
9+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
FROM circleci/circleci-cli:alpine
2+
3+
LABEL "com.github.actions.name"="Publish Orb on CircleCI Registry"
4+
LABEL "com.github.actions.description"="Publish Orb on CircleCI Registry"
5+
LABEL "com.github.actions.icon"="mic"
6+
LABEL "com.github.actions.color"="black"
7+
8+
LABEL "repository"="http://github.com/nebulab/circleci-orbs-feature-branch-preview"
9+
LABEL "homepage"="http://github.com/nebulab/circleci-orbs-feature-branch-preview"
10+
LABEL "maintainer"="kennyadsl <[email protected]>"
11+
12+
ADD entrypoint.sh /entrypoint.sh
13+
ENTRYPOINT ["/entrypoint.sh"]
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/sh -l
2+
3+
# Setup using the secret CIRCLECI_TOKEN
4+
circleci setup --no-prompt --token $CIRCLECI_TOKEN
5+
6+
# Publish the orb on CircleCI Orbs Registry
7+
circleci orb publish source.yml nebulab/feature-branch-preview@dev:0.0.1

0 commit comments

Comments
 (0)