Skip to content

Commit

Permalink
fix: CI
Browse files Browse the repository at this point in the history
Signed-off-by: Gabriel Nützi <[email protected]>
  • Loading branch information
gabyx committed Jul 6, 2024
1 parent 9410494 commit ab939a8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/normal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ jobs:
- name: Build package (nix)
run: |
just nix-develop-ci nix-package
just nix-develop-ci just nix-package
- name: Build container image (nix)
run: |
Expand Down
11 changes: 11 additions & 0 deletions tools/ci/upload-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ ROOT_DIR=$(git rev-parse --show-toplevel)

cd "$ROOT_DIR"

USERNAME=${GITHUB_REPOSITORY_OWNER:-$USERNAME}
PASSWORD=${GITHUB_TOKEN:-$PASSWORD}

if [ -z "$USERNAME" ] || [ -z "$PASSWORD" ]; then
die "'USERNAME' or 'PASSWORD' env. variables not set."
fi

function main() {
if ! ci_is_running; then
die "This script should only be executed in CI"
Expand All @@ -30,9 +37,13 @@ function main() {
print_info "Read the image from file '$image_path' and " \
"directly push to registry '$image_name'."

cat "$HOME/.docker/config.json"

skopeo \
--insecure-policy \
copy \
--dest-username <(echo "$USERNAME") \
--dest-password <(echo "$PASSWORD") \
--dest-authfile "$HOME/.docker/config.json" \
"docker-archive://$image_path" \
"docker://$image_name"
Expand Down

0 comments on commit ab939a8

Please sign in to comment.