Skip to content

chore: allow overwriting Docker images #4850

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 11, 2022
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
16 changes: 0 additions & 16 deletions ci/steps/docker-buildx-push.sh
Original file line number Diff line number Diff line change
@@ -1,28 +1,12 @@
#!/usr/bin/env bash
set -euo pipefail

# See if this version already exists on Docker Hub.
function version_exists() {
local output
output=$(curl --silent "https://index.docker.io/v1/repositories/codercom/code-server/tags/$VERSION")
if [[ $output == "Tag not found" ]]; then
return 1
else
return 0
fi
}

main() {
cd "$(dirname "$0")/../.."

# ci/lib.sh sets VERSION and provides download_artifact here
source ./ci/lib.sh

if version_exists; then
echo "$VERSION is already pushed"
return
fi

# Download the release-packages artifact
download_artifact release-packages ./release-packages

Expand Down