Skip to content

Commit f8565d0

Browse files
committed
refactor(ci): combine publish workflows
1 parent 9d8588b commit f8565d0

File tree

2 files changed

+43
-42
lines changed

2 files changed

+43
-42
lines changed

.github/workflows/docker.yaml

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -17,44 +17,3 @@ concurrency:
1717
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
1818

1919
jobs:
20-
docker-images:
21-
runs-on: ubuntu-20.04
22-
steps:
23-
- name: Checkout
24-
uses: actions/checkout@v3
25-
26-
- name: Set up QEMU
27-
uses: docker/setup-qemu-action@v2
28-
29-
- name: Set up Docker Buildx
30-
uses: docker/setup-buildx-action@v2
31-
32-
- name: Login to Docker Hub
33-
uses: docker/login-action@v2
34-
with:
35-
username: ${{ secrets.DOCKER_USERNAME }}
36-
password: ${{ secrets.DOCKER_PASSWORD }}
37-
38-
- name: Login to GHCR
39-
uses: docker/login-action@v2
40-
with:
41-
registry: ghcr.io
42-
username: ${{ github.actor }}
43-
password: ${{ secrets.GITHUB_TOKEN }}
44-
45-
- name: Get version
46-
id: version
47-
run: echo "::set-output name=version::$(jq -r .version package.json)"
48-
49-
- name: Download release artifacts
50-
uses: robinraju/[email protected]
51-
with:
52-
repository: "coder/code-server"
53-
tag: v${{ steps.version.outputs.version }}
54-
fileName: "*.deb"
55-
out-file-path: "release-packages"
56-
57-
- name: Publish to Docker
58-
run: yarn publish:docker
59-
env:
60-
GITHUB_TOKEN: ${{ github.token }}

.github/workflows/npm-brew.yaml renamed to .github/workflows/publish.yaml

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Publish on npm and brew
1+
name: Publish code-server
22

33
on:
44
# Shows the manual trigger in GitHub UI
@@ -21,6 +21,7 @@ jobs:
2121
npm:
2222
runs-on: ubuntu-latest
2323
steps:
24+
- name: Checkout code-server
2425
- uses: actions/checkout@v3
2526

2627
- name: Get version
@@ -116,3 +117,44 @@ jobs:
116117
git commit -m "chore: updating version to ${{ steps.version.outputs.version }}"
117118
git push -u origin $(git branch --show)
118119
gh pr create --repo coder/code-server-aur --title "chore: bump version to ${{ steps.version.outputs.version }}" --body "PR opened by @$GITHUB_ACTOR" --assignee $GITHUB_ACTOR
120+
docker:
121+
runs-on: ubuntu-20.04
122+
steps:
123+
- name: Checkout code-server
124+
uses: actions/checkout@v3
125+
126+
- name: Set up QEMU
127+
uses: docker/setup-qemu-action@v2
128+
129+
- name: Set up Docker Buildx
130+
uses: docker/setup-buildx-action@v2
131+
132+
- name: Login to Docker Hub
133+
uses: docker/login-action@v2
134+
with:
135+
username: ${{ secrets.DOCKER_USERNAME }}
136+
password: ${{ secrets.DOCKER_PASSWORD }}
137+
138+
- name: Login to GHCR
139+
uses: docker/login-action@v2
140+
with:
141+
registry: ghcr.io
142+
username: ${{ github.actor }}
143+
password: ${{ secrets.GITHUB_TOKEN }}
144+
145+
- name: Get version
146+
id: version
147+
run: echo "::set-output name=version::$(jq -r .version package.json)"
148+
149+
- name: Download release artifacts
150+
uses: robinraju/[email protected]
151+
with:
152+
repository: "coder/code-server"
153+
tag: v${{ steps.version.outputs.version }}
154+
fileName: "*.deb"
155+
out-file-path: "release-packages"
156+
157+
- name: Publish to Docker
158+
run: yarn publish:docker
159+
env:
160+
GITHUB_TOKEN: ${{ github.token }}

0 commit comments

Comments
 (0)