Skip to content

Commit

Permalink
fix(dev): Check out correct commit in manual GHA Build & Test workf…
Browse files Browse the repository at this point in the history
…low (#4954)

Our `Build & Test` GHA workflow can be triggered manually, and when you trigger it, you can either pick the branch to run it on or give it a specific commit to test. The former works fine, but the latter does not - though it picks up the given commit and correctly puts it in the env, it doesn't actually use that value when checking out the commit, instead always relying on the default value. This fixes that by always specifying what value to use.
  • Loading branch information
lobsterkatie committed Apr 26, 2022
1 parent 4880618 commit 5d3fcc4
Showing 1 changed file with 26 additions and 1 deletion.
27 changes: 26 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ jobs:
steps:
- name: Check out current commit (${{ env.HEAD_COMMIT }})
uses: actions/checkout@v2
with:
ref: ${{ env.HEAD_COMMIT }}
- name: Set up Node
uses: actions/setup-node@v1
# we use a hash of yarn.lock as our cache key, because if it hasn't changed, our dependencies haven't changed,
Expand Down Expand Up @@ -68,6 +70,8 @@ jobs:
steps:
- name: Check out current commit (${{ env.HEAD_COMMIT }})
uses: actions/checkout@v2
with:
ref: ${{ env.HEAD_COMMIT }}
- name: Set up Node
uses: actions/setup-node@v1
- name: Check dependency cache
Expand Down Expand Up @@ -109,6 +113,8 @@ jobs:
steps:
- name: Check out current commit (${{ env.HEAD_COMMIT }})
uses: actions/checkout@v2
with:
ref: ${{ env.HEAD_COMMIT }}
- name: Set up Node
uses: actions/setup-node@v1
with:
Expand Down Expand Up @@ -139,6 +145,8 @@ jobs:
steps:
- name: Check out current commit (${{ env.HEAD_COMMIT }})
uses: actions/checkout@v2
with:
ref: ${{ env.HEAD_COMMIT }}
- name: Set up Node
uses: actions/setup-node@v1
- name: Check dependency cache
Expand All @@ -162,6 +170,8 @@ jobs:
steps:
- name: Check out current commit (${{ env.HEAD_COMMIT }})
uses: actions/checkout@v2
with:
ref: ${{ env.HEAD_COMMIT }}
- name: Set up Node
uses: actions/setup-node@v1
- name: Check dependency cache
Expand All @@ -186,6 +196,8 @@ jobs:
steps:
- name: Check out current commit (${{ github.sha }})
uses: actions/checkout@v2
with:
ref: ${{ env.HEAD_COMMIT }}
- name: Set up Node
uses: actions/setup-node@v1
- name: Check dependency cache
Expand Down Expand Up @@ -223,6 +235,8 @@ jobs:
steps:
- name: Check out current commit (${{ env.HEAD_COMMIT }})
uses: actions/checkout@v2
with:
ref: ${{ env.HEAD_COMMIT }}
- name: Set up Node
uses: actions/setup-node@v1
with:
Expand Down Expand Up @@ -256,6 +270,8 @@ jobs:
steps:
- name: Check out current commit (${{ env.HEAD_COMMIT }})
uses: actions/checkout@v2
with:
ref: ${{ env.HEAD_COMMIT }}
- name: Set up Node
uses: actions/setup-node@v1
with:
Expand Down Expand Up @@ -288,11 +304,12 @@ jobs:
steps:
- name: Check out current commit (${{ env.HEAD_COMMIT }})
uses: actions/checkout@v2
with:
ref: ${{ env.HEAD_COMMIT }}
# TODO: removing `fetch-depth` below seems to have no effect, and the commit which added it had no description,
# so it's not clear why it's necessary. That said, right now ember tests are xfail, so it's a little hard to
# tell if it's safe to remove. Once ember tests are fixed, let's try again with it turned off, and if all goes
# well, we can pull it out.
with:
fetch-depth: 0
- name: Set up Node
uses: actions/setup-node@v1
Expand Down Expand Up @@ -343,6 +360,8 @@ jobs:
steps:
- name: Check out current commit (${{ env.HEAD_COMMIT }})
uses: actions/checkout@v2
with:
ref: ${{ env.HEAD_COMMIT }}
- name: Set up Node
uses: actions/setup-node@v1
with:
Expand Down Expand Up @@ -381,6 +400,8 @@ jobs:
steps:
- name: Check out current commit (${{ env.HEAD_COMMIT }})
uses: actions/checkout@v2
with:
ref: ${{ env.HEAD_COMMIT }}
- name: Set up Node
uses: actions/setup-node@v1
- name: Check dependency cache
Expand Down Expand Up @@ -410,6 +431,8 @@ jobs:
steps:
- name: Check out current commit (${ env.HEAD_COMMIT }})
uses: actions/checkout@v2
with:
ref: ${{ env.HEAD_COMMIT }}
- name: Set up Node
uses: actions/setup-node@v1
with:
Expand Down Expand Up @@ -445,6 +468,8 @@ jobs:
steps:
- name: Check out current commit (${{ github.sha }})
uses: actions/checkout@v2
with:
ref: ${{ env.HEAD_COMMIT }}
- name: Set up Node
uses: actions/setup-node@v1
with:
Expand Down

0 comments on commit 5d3fcc4

Please sign in to comment.