Skip to content

Commit

Permalink
more tweaks to get the actual commit
Browse files Browse the repository at this point in the history
ugh why so hard to do the expected thing.

i get that its nice or whatever to automatically use a merged version,
except it isn't because its not obvious that its doing that, and I can't
access the merge commit in a subsequent checkout
  • Loading branch information
joelmccracken committed Dec 27, 2024
1 parent d81f904 commit d6f126e
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 7 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,12 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.sha }}
- name: Run a one-line script
ref: ${{ github.event.pull_request.head.sha }}
# ref: ${{ github.sha }}
- run: ./test/ci.sh
env:
WORKSTATION_VERSION: ${{ github.event.pull_request.head.sha }}
BW_CLIENTID: ${{ secrets.BW_CLIENTID }}
BW_CLIENTSECRET: ${{ secrets.BW_CLIENTSECRET }}
WS_BW_MASTER_PASS: ${{ secrets.WS_BW_MASTER_PASS }}
run: ./test/ci.sh
# Github Actions CI:1 ends here
13 changes: 12 additions & 1 deletion .github/workflows/ws_tool.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ jobs:
submodules: recursive
ref: ${{ github.event.pull_request.head.ref }}
- run: ws_tool/test/bats/bin/bats ws_tool/test
env:
WORKSTATION_VERSION: ${{ github.event.pull_request.head.sha }}
BW_CLIENTID: ${{ secrets.BW_CLIENTID }}
BW_CLIENTSECRET: ${{ secrets.BW_CLIENTSECRET }}
WS_BW_MASTER_PASS: ${{ secrets.WS_BW_MASTER_PASS }}

full-setup:
strategy:
Expand All @@ -45,5 +50,11 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: recursive
ref: ${{ github.sha }}
ref: ${{ github.event.pull_request.head.sha }}
# ref: ${{ github.sha }}
- run: bash ws_tool/test/ci_full_setup.bash
env:
WORKSTATION_VERSION: ${{ github.event.pull_request.head.sha }}
BW_CLIENTID: ${{ secrets.BW_CLIENTID }}
BW_CLIENTSECRET: ${{ secrets.BW_CLIENTSECRET }}
WS_BW_MASTER_PASS: ${{ secrets.WS_BW_MASTER_PASS }}
4 changes: 2 additions & 2 deletions test/ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ set -xeuo pipefail

cd ~

if [ "$GITHUB_SHA" == "" ]; then
if [ "$WORKSTATION_VERSION" == "" ]; then
WORKSTATION_BOOTSTRAP_COMMIT=master
else
WORKSTATION_BOOTSTRAP_COMMIT="$GITHUB_SHA"
WORKSTATION_BOOTSTRAP_COMMIT="$WORKSTATION_VERSION"
fi

curl https://raw.githubusercontent.com/joelmccracken/workstation/$WORKSTATION_BOOTSTRAP_COMMIT/bootstrap-workstation.sh > bootstrap-workstation.sh
Expand Down
1 change: 0 additions & 1 deletion ws_tool/test/ci_full_setup.bash
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ set -xeuo pipefail
rm -rf $HOME/.config/workstation

unset WORKSTATION_DIR
export WORKSTATION_VERSION="$GITHUB_SHA"

bash <(curl "https://raw.githubusercontent.com/joelmccracken/workstation/${WORKSTATION_VERSION}/ws_tool/ws_install.sh")

Expand Down

0 comments on commit d6f126e

Please sign in to comment.