Skip to content

Commit

Permalink
fix(ci): fix b2 install
Browse files Browse the repository at this point in the history
  • Loading branch information
steinbrueckri committed Sep 21, 2024
1 parent 43f63e3 commit bcbe61c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ on:
- push
- pull_request_target

permissions: read-all
# down scope as necessary via https://docs.github.com/en/actions/reference/authentication-in-a-workflow#modifying-the-permissions-for-the-github_token
permissions: write-all

env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
Expand Down
10 changes: 5 additions & 5 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ tasks:
mkdir -p $HOME/bin
curl -L https://github.com/Backblaze/B2_Command_Line_Tool/releases/latest/download/b2-linux -o {{.B2_BIN_PATH}}
chmod +x {{.B2_BIN_PATH}}
export PATH=$PATH:$HOME/bin
{{.B2_BIN_PATH}} version
{{.B2_BIN_PATH}} authorize-account
else
echo "b2 is already installed."
Expand Down Expand Up @@ -121,7 +121,7 @@ tasks:

ci:
desc: Continuous Integration build
deps:
- install-b2
- get-gallery-images
- build
cmds:
- task: install-b2
- task: get-gallery-images
- task: build
6 changes: 4 additions & 2 deletions get_gallery_images.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/usr/bin/env bash
set -e
export PATH=$PATH:$HOME/bin

## Configuration ###############################################################
SEARCH_PATH="content/gallery/**"
B2_APPLICATION_KEY_ID=$2
Expand All @@ -9,8 +11,8 @@ B2_APPLICATION_KEY=$3
# Check if b2 command is available
if ! command -v b2 &> /dev/null
then
echo "b2 could not be found"
exit
echo "ERROR: b2 command not be found"
exit 255
fi

## Flight ######################################################################
Expand Down

1 comment on commit bcbe61c

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.