Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,23 @@ runs:
echo "cache=$cache" >> "$GITHUB_OUTPUT"
echo "token=$token" >> "$GITHUB_OUTPUT"

- name: Add Attic bin to PATH
if: steps.select.outputs.token != '' && inputs.attic-endpoint != ''
shell: bash
run: |
if command -v attic >/dev/null 2>&1; then
echo "attic already on PATH: $(command -v attic)"
exit 0
fi
bin="$(nix --extra-experimental-features 'nix-command flakes' build --no-link --print-out-paths \
'github:NixOS/nixpkgs/nixpkgs-unstable#attic-client')/bin"
echo "$bin" >> "$GITHUB_PATH"

# Publishing only; reading is covered by the substituters above. Runs as a
# post step at the end of the job, pushing the store paths the job built.
- name: Setup Attic push
if: steps.select.outputs.token != '' && inputs.attic-endpoint != ''
uses: ryanccn/attic-action@v0.4.1
uses: ryanccn/attic-action@v0.5.0
with:
endpoint: ${{ inputs.attic-endpoint }}
cache: ${{ steps.select.outputs.cache }}
Expand Down
Loading