Skip to content

Commit 43733b7

Browse files
Merge pull request #143 from godaddy/use-setup-bun-action
Replace curl|bash Bun install with oven-sh/setup-bun action
2 parents b77ef67 + eff2206 commit 43733b7

2 files changed

Lines changed: 2 additions & 55 deletions

File tree

.github/workflows/publish.yml

Lines changed: 1 addition & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -13,39 +13,9 @@ jobs:
1313
options: --ulimit core=-1 --ulimit memlock=-1:-1
1414
steps:
1515
- uses: actions/checkout@v4
16-
- name: Install Bun
17-
run: |
18-
set -e # Exit on error
19-
# GitHub Actions containers set HOME=/github/home
20-
export BUN_INSTALL="/github/home/.bun"
21-
echo "Installing Bun to $BUN_INSTALL..."
22-
curl -fsSL https://bun.sh/install | bash
23-
echo "Checking if Bun was installed..."
24-
ls -la /github/home/.bun/bin/ || echo "Bun directory not found at /github/home/.bun/bin/"
25-
# Try alternative location if primary fails
26-
if [ ! -f "/github/home/.bun/bin/bun" ]; then
27-
echo "Bun not at /github/home/.bun/bin/bun, checking $HOME/.bun/bin/bun..."
28-
ls -la $HOME/.bun/bin/ || echo "Bun not at $HOME/.bun/bin/ either"
29-
if [ -f "$HOME/.bun/bin/bun" ]; then
30-
cp $HOME/.bun/bin/bun /usr/local/bin/bun
31-
else
32-
echo "ERROR: Could not find Bun binary after installation"
33-
exit 1
34-
fi
35-
else
36-
cp /github/home/.bun/bin/bun /usr/local/bin/bun
37-
fi
38-
chmod +x /usr/local/bin/bun
39-
/usr/local/bin/bun --version
16+
- uses: oven-sh/setup-bun@ecf28ddc73e819eb6fa29df6b34ef8921c743461 # v2
4017
- name: Install packages
4118
run: npm install
42-
- name: Verify Bun is available
43-
run: |
44-
echo "Checking Bun availability..."
45-
ls -la /usr/local/bin/bun || echo "/usr/local/bin/bun not found"
46-
which bun || echo "bun not in PATH"
47-
/usr/local/bin/bun --version || echo "Cannot run /usr/local/bin/bun"
48-
bun --version || echo "Cannot run bun directly"
4919
- name: Test
5020
run: npm test
5121
- name: Set version to match tag

.github/workflows/test.yml

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -30,30 +30,7 @@ jobs:
3030
options: --ulimit core=-1 --ulimit memlock=-1:-1
3131
steps:
3232
- uses: actions/checkout@v4
33-
- name: Install Bun
34-
run: |
35-
set -e # Exit on error
36-
# GitHub Actions containers set HOME=/github/home
37-
export BUN_INSTALL="/github/home/.bun"
38-
echo "Installing Bun to $BUN_INSTALL..."
39-
curl -fsSL https://bun.sh/install | bash
40-
echo "Checking if Bun was installed..."
41-
ls -la /github/home/.bun/bin/ || echo "Bun directory not found at /github/home/.bun/bin/"
42-
# Try alternative location if primary fails
43-
if [ ! -f "/github/home/.bun/bin/bun" ]; then
44-
echo "Bun not at /github/home/.bun/bin/bun, checking $HOME/.bun/bin/bun..."
45-
ls -la $HOME/.bun/bin/ || echo "Bun not at $HOME/.bun/bin/ either"
46-
if [ -f "$HOME/.bun/bin/bun" ]; then
47-
cp $HOME/.bun/bin/bun /usr/local/bin/bun
48-
else
49-
echo "ERROR: Could not find Bun binary after installation"
50-
exit 1
51-
fi
52-
else
53-
cp /github/home/.bun/bin/bun /usr/local/bin/bun
54-
fi
55-
chmod +x /usr/local/bin/bun
56-
/usr/local/bin/bun --version
33+
- uses: oven-sh/setup-bun@ecf28ddc73e819eb6fa29df6b34ef8921c743461 # v2
5734
- name: Install npm packages
5835
run: npm install
5936
- name: Unit Test (includes Bun test via posttest)

0 commit comments

Comments
 (0)