Skip to content

Commit 3bbe8f3

Browse files
committed
refactor(ci): combine publish workflows
1 parent 61673b5 commit 3bbe8f3

File tree

2 files changed

+44
-42
lines changed

2 files changed

+44
-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: 44 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
@@ -67,3 +68,45 @@ jobs:
6768
env:
6869
HOMEBREW_GITHUB_API_TOKEN: ${{secrets.HOMEBREW_GITHUB_API_TOKEN}}
6970
run: ./ci/steps/brew-bump.sh
71+
72+
docker:
73+
runs-on: ubuntu-20.04
74+
steps:
75+
- name: Checkout code-server
76+
uses: actions/checkout@v3
77+
78+
- name: Set up QEMU
79+
uses: docker/setup-qemu-action@v2
80+
81+
- name: Set up Docker Buildx
82+
uses: docker/setup-buildx-action@v2
83+
84+
- name: Login to Docker Hub
85+
uses: docker/login-action@v2
86+
with:
87+
username: ${{ secrets.DOCKER_USERNAME }}
88+
password: ${{ secrets.DOCKER_PASSWORD }}
89+
90+
- name: Login to GHCR
91+
uses: docker/login-action@v2
92+
with:
93+
registry: ghcr.io
94+
username: ${{ github.actor }}
95+
password: ${{ secrets.GITHUB_TOKEN }}
96+
97+
- name: Get version
98+
id: version
99+
run: echo "::set-output name=version::$(jq -r .version package.json)"
100+
101+
- name: Download release artifacts
102+
uses: robinraju/[email protected]
103+
with:
104+
repository: "coder/code-server"
105+
tag: v${{ steps.version.outputs.version }}
106+
fileName: "*.deb"
107+
out-file-path: "release-packages"
108+
109+
- name: Publish to Docker
110+
run: yarn publish:docker
111+
env:
112+
GITHUB_TOKEN: ${{ github.token }}

0 commit comments

Comments
 (0)