Skip to content

Commit

Permalink
ci: refactor deprecated GitHub set-output commands
Browse files Browse the repository at this point in the history
  • Loading branch information
Connor Baker committed Nov 29, 2023
1 parent dd4c8c8 commit 820de45
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@ jobs:
- uses: actions/checkout@v4
- name: Get Stack snapshot install directory
id: stack-snapshot
# NOTE: `stack path` must run at least once prior to caching to ensure the directory
# exists and is populated.
run: |
stack path --snapshot-install-root
echo "::set-output name=dir::$(stack path --snapshot-install-root)"
echo "dir=$(stack path --snapshot-install-root)" > "${GITHUB_OUTPUT}"
- uses: actions/cache@v3
with:
path: ${{ steps.stack-snapshot.outputs.dir }}
Expand Down Expand Up @@ -46,12 +48,14 @@ jobs:
nix-env -f. -iA nixpkgs.stack
- name: Get Stack snapshot install directory
id: stack-snapshot
# NOTE: `stack path` must run at least once prior to caching to ensure the directory
# exists and is populated.
# NOTE: The renaming of the stack.yaml file is a workaround for
# https://github.com/commercialhaskell/stack/issues/5028.
run: |
# XXX Workaround
# https://github.com/commercialhaskell/stack/issues/5028.
[ ${{ matrix.stack_yaml }} = stack.yaml ] || mv ${{ matrix.stack_yaml }} stack.yaml
stack --nix path --snapshot-install-root
echo "::set-output name=dir::$(stack --nix path --snapshot-install-root)"
echo "dir=$(stack --nix path --snapshot-install-root)" > "${GITHUB_OUTPUT}"
- uses: actions/cache@v3
with:
path: ${{ steps.stack-snapshot.outputs.dir }}
Expand Down

0 comments on commit 820de45

Please sign in to comment.