Skip to content

Commit 7785765

Browse files
committed
GitHub workflow: download $ bob to global dir instead of workdir
this is to prevent Git et al. from marking the workdir as unclean. the unclean status can propagate to things like Go build metadata which would then show the unclean status in possible version number etc.
1 parent d7181f3 commit 7785765

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ jobs:
1111
- name: Build
1212
run: |
1313
set -eu
14-
curl --fail --location --no-progress-meter --output bob https://function61.com/go/turbobob-latest-stable-linux-amd64 && chmod +x bob
15-
./bob build in-ci-autodetect-settings
14+
curl --fail --location --no-progress-meter --output /usr/local/bin/bob https://function61.com/go/turbobob-latest-stable-linux-amd64 && chmod +x /usr/local/bin/bob
15+
bob build in-ci-autodetect-settings
1616
env:
1717
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1818
EVENTHORIZON: ${{ secrets.EVENTHORIZON }}

cmd/bob/init.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,13 @@ jobs:
2222
build:
2323
runs-on: ubuntu-latest
2424
steps:
25-
- uses: actions/checkout@v2
25+
- uses: actions/checkout@v4
2626
2727
- name: Build
2828
run: |
29-
curl --fail --location --silent --output bob https://function61.com/go/turbobob-latest-linux-amd64 && chmod +x bob
30-
./bob build in-ci-autodetect-settings
29+
set -eu
30+
curl --fail --location --no-progress-meter --output /usr/local/bin/bob https://function61.com/go/turbobob-latest-stable-linux-amd64 && chmod +x /usr/local/bin/bob
31+
bob build in-ci-autodetect-settings
3132
env:
3233
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3334
`)

0 commit comments

Comments
 (0)