Skip to content

Commit 583c213

Browse files
committed
install coder binary
1 parent 995ca7a commit 583c213

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

.github/workflows/pr-deploy.yaml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ jobs:
7373

7474
build:
7575
needs: pr_commented
76+
if: false
7677
runs-on: ${{ github.repository_owner == 'coder' && 'buildjet-8vcpu-ubuntu-2204' || 'ubuntu-latest' }}
7778
env:
7879
DOCKER_CLI_EXPERIMENTAL: "enabled"
@@ -120,7 +121,8 @@ jobs:
120121
121122
deploy:
122123
needs: [build, pr_commented]
123-
if: needs.build.result == 'success'
124+
# if: needs.build.result == 'success'
125+
if: true
124126
runs-on: "ubuntu-latest"
125127
env:
126128
CODER_IMAGE_TAG: ${{ needs.pr_commented.outputs.CODER_IMAGE_TAG }}
@@ -162,6 +164,7 @@ jobs:
162164
spec:
163165
tls:
164166
- hosts:
167+
- "${{ secrets.PR_DEPLOYMENTS_DOMAIN }}"
165168
- "*.${{ secrets.PR_DEPLOYMENTS_DOMAIN }}"
166169
secretName: pr${{ env.PR_NUMBER }}-tls
167170
rules:
@@ -223,6 +226,18 @@ jobs:
223226
run: |
224227
sleep 30
225228
229+
- name: Get Coder binary
230+
run: |
231+
set -euxo pipefail
232+
ARCH="$(arch)"
233+
PLATFORM="$(uname | tr '[:upper:]' '[:lower:]')"
234+
DEST="${HOME}/coder"
235+
236+
mkdir -p "$(dirname ${DEST})"
237+
curl -fsSL "${{ env.PR_DEPLOYMENT_ACCESS_URL }}/bin/coder-${PLATFORM}-${ARCH}" -o "${DEST}"
238+
chmod +x "${DEST}"
239+
"${DEST}" version
240+
226241
- name: Create first user, template and workspace
227242
id: setup_deployment
228243
run: |
@@ -231,7 +246,7 @@ jobs:
231246
# Create first user
232247
233248
# create a masked random password 12 characters long
234-
password=$(openssl rand -base64 6 | tr -d "=+/" | cut -c1-12)
249+
password=$(openssl rand -base64 16 | tr -d "=+/" | cut -c1-12)
235250
236251
# add mask so that the password is not printed to the logs
237252
echo "::add-mask::$password"

0 commit comments

Comments
 (0)