|
5 | 5 | paths: |
6 | 6 | - src/modes/shellcode.* |
7 | 7 | - src/prefab/construct-env.* |
| 8 | + - .github/actions/setup-apt/** |
8 | 9 | - .github/workflows/ci.shellcode.yml |
9 | 10 |
|
10 | 11 | workflow_call: |
@@ -41,10 +42,12 @@ jobs: |
41 | 42 | path: /usr/local/bin |
42 | 43 | name: pkgx |
43 | 44 |
|
44 | | - - name: prep |
45 | | - run: | |
46 | | - apt-get update && apt-get --yes install bash libatomic1 |
47 | | - chmod u+x /usr/local/bin/pkgx |
| 45 | + - uses: actions/checkout@v4 |
| 46 | + - run: chmod u+x /usr/local/bin/pkgx |
| 47 | + shell: sh |
| 48 | + - uses: ./.github/actions/setup-apt |
| 49 | + with: |
| 50 | + packages: bash libatomic1 |
48 | 51 |
|
49 | 52 | - run: | |
50 | 53 | test -n "$BASH_VERSION" |
@@ -134,11 +137,12 @@ jobs: |
134 | 137 | path: /usr/local/bin |
135 | 138 | name: pkgx |
136 | 139 |
|
137 | | - - name: prep |
138 | | - run: | |
139 | | - apt-get update && apt-get --yes install zsh libatomic1 |
140 | | - chmod u+x /usr/local/bin/pkgx |
141 | | - shell: sh # ∵ cannot be zsh until zsh is installed |
| 140 | + - uses: actions/checkout@v4 |
| 141 | + - run: chmod u+x /usr/local/bin/pkgx |
| 142 | + shell: sh |
| 143 | + - uses: ./.github/actions/setup-apt |
| 144 | + with: |
| 145 | + packages: zsh libatomic1 |
142 | 146 |
|
143 | 147 | # NOTE matrix does not work for the shell key :-/ |
144 | 148 | - run: | |
@@ -239,10 +243,12 @@ jobs: |
239 | 243 | path: /usr/local/bin |
240 | 244 | name: pkgx |
241 | 245 |
|
242 | | - - name: prep |
243 | | - run: | |
244 | | - apt-get update && apt-get --yes install libatomic1 |
245 | | - chmod u+x /usr/local/bin/pkgx |
| 246 | + - uses: actions/checkout@v4 |
| 247 | + - run: chmod u+x /usr/local/bin/pkgx |
| 248 | + shell: sh |
| 249 | + - uses: ./.github/actions/setup-apt |
| 250 | + with: |
| 251 | + packages: libatomic1 |
246 | 252 |
|
247 | 253 | # NOTE matrix does not work for the shell key :-/ |
248 | 254 | - name: test `use` shellcode |
@@ -302,10 +308,12 @@ jobs: |
302 | 308 | path: /usr/local/bin |
303 | 309 | name: pkgx |
304 | 310 |
|
305 | | - - name: prep |
306 | | - run: | |
307 | | - apt-get update && apt-get --yes install bash libatomic1 |
308 | | - chmod u+x /usr/local/bin/pkgx |
| 311 | + - uses: actions/checkout@v4 |
| 312 | + - run: chmod u+x /usr/local/bin/pkgx |
| 313 | + shell: sh |
| 314 | + - uses: ./.github/actions/setup-apt |
| 315 | + with: |
| 316 | + packages: bash libatomic1 |
309 | 317 |
|
310 | 318 | - run: | |
311 | 319 | eval "$(pkgx --shellcode)" |
@@ -345,10 +353,12 @@ jobs: |
345 | 353 | path: /usr/local/bin |
346 | 354 | name: pkgx |
347 | 355 |
|
348 | | - - name: prep |
349 | | - run: | |
350 | | - apt-get update && apt-get --yes install bash libatomic1 |
351 | | - chmod u+x /usr/local/bin/pkgx |
| 356 | + - uses: actions/checkout@v4 |
| 357 | + - run: chmod u+x /usr/local/bin/pkgx |
| 358 | + shell: sh |
| 359 | + - uses: ./.github/actions/setup-apt |
| 360 | + with: |
| 361 | + packages: bash libatomic1 |
352 | 362 |
|
353 | 363 | - run: | |
354 | 364 | echo '#!/usr/bin/env -S pkgx +ack node' > foo |
@@ -444,11 +454,12 @@ jobs: |
444 | 454 | with: |
445 | 455 | path: /usr/local/bin |
446 | 456 | name: pkgx |
447 | | - - name: prep |
448 | | - run: | |
449 | | - sudo apt-get update && sudo apt-get --yes install zsh libatomic1 |
450 | | - chmod u+x /usr/local/bin/pkgx |
| 457 | + - uses: actions/checkout@v4 |
| 458 | + - run: chmod u+x /usr/local/bin/pkgx |
451 | 459 | shell: sh |
| 460 | + - uses: ./.github/actions/setup-apt |
| 461 | + with: |
| 462 | + packages: zsh libatomic1 |
452 | 463 | - run: | |
453 | 464 | alias x="echo hi" |
454 | 465 | eval "$(pkgx --shellcode)" |
|
0 commit comments