Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/actionlint.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
self-hosted-runner:
labels:
- 'ecs-qwen'
- 'ecs-update-sg'
- 'ecs-update-64c'

config-variables: null
32 changes: 16 additions & 16 deletions .github/workflows/update-ecs-runner-qwen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,24 @@ on:
required: false
default: ''
type: 'string'
repository_dispatch:
types: ['npm-published']
Comment thread
yiliang114 marked this conversation as resolved.
Resolved

permissions:
contents: 'read'

concurrency:
group: 'update-ecs-runner-qwen-sg'
cancel-in-progress: false

jobs:
update:
name: 'Update Qwen on Singapore ECS runner'
name: 'Update Qwen on ${{ matrix.runner }}'
if: "${{ github.repository == 'QwenLM/qwen-code' }}"
runs-on: ['self-hosted', 'linux', 'x64', 'ecs-qwen']
strategy:
matrix:
runner: ['ecs-update-sg', 'ecs-update-64c']
fail-fast: false
runs-on: ['self-hosted', 'linux', 'x64', '${{ matrix.runner }}']
concurrency:
group: 'update-ecs-runner-qwen-${{ matrix.runner }}'
cancel-in-progress: false
timeout-minutes: 10
steps:
- name: 'Resolve version'
Expand All @@ -46,16 +51,11 @@ jobs:
VERSION: '${{ steps.version.outputs.version }}'
run: |-
set -euo pipefail
global_root="$(npm root -g)"
global_bin="$(npm prefix -g)/bin"
if [[ -w "${global_root}" && -w "${global_bin}" ]]; then
npm install -g "@qwen-code/qwen-code@${VERSION}"
elif command -v sudo >/dev/null 2>&1 && sudo -n true; then
sudo npm install -g "@qwen-code/qwen-code@${VERSION}"
else
echo "::error::Global npm install directories are not writable and passwordless sudo is unavailable."
exit 1
fi
# Always use sudo so the package lands in /usr/local (the system-wide
# global prefix that every user's PATH resolves first). Without sudo
# the runner user (github-runner) installs into its own home directory
# which is shadowed by the older root-installed binary in /usr/local/bin.
sudo npm install -g "@qwen-code/qwen-code@${VERSION}"

- name: 'Verify version'
env:
Expand Down
Loading