Skip to content

Commit 6a7c322

Browse files
authored
refactor(ci): combine publish workflows (#5471)
* refactor(ci): combine publish workflows * fixup! refactor(ci): combine publish workflows
1 parent 9d8588b commit 6a7c322

File tree

2 files changed

+43
-61
lines changed

2 files changed

+43
-61
lines changed

.github/workflows/docker.yaml

-60
This file was deleted.

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

+43-1
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/release-downloader@v1.4
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)