feature/auto-update-forgejo #2
1 changed files with 3 additions and 2 deletions
|
|
@ -78,6 +78,7 @@ get_current_version() {
|
||||||
# Update Forgejo to the latest version
|
# Update Forgejo to the latest version
|
||||||
update_forgejo() {
|
update_forgejo() {
|
||||||
local latest_version=$1
|
local latest_version=$1
|
||||||
|
local image_name="codeberg.org/forgejo/forgejo"
|
||||||
|
|
||||||
log "Starting Forgejo update process..."
|
log "Starting Forgejo update process..."
|
||||||
|
|
||||||
|
|
@ -92,11 +93,11 @@ update_forgejo() {
|
||||||
|
|
||||||
# Pull the latest image
|
# Pull the latest image
|
||||||
log "Pulling the latest Forgejo image..."
|
log "Pulling the latest Forgejo image..."
|
||||||
docker pull "codeberg.org/forgejo/forgejo:$latest_version"
|
docker pull "$image_name:$latest_version"
|
||||||
|
|
||||||
# Update the docker-compose file with the new version
|
# Update the docker-compose file with the new version
|
||||||
log "Updating docker-compose.yml with the new version..."
|
log "Updating docker-compose.yml with the new version..."
|
||||||
sed -i "s/codeberg.org\/forgejo\/forgejo:[0-9.]*\+*/codeberg.org\/forgejo\/forgejo:$latest_version/g" "$COMPOSE_FILE"
|
sed -i "s|codeberg.org/forgejo/forgejo:[0-9.]*\+*|$image_name:$latest_version|g" "$COMPOSE_FILE"
|
||||||
|
|
||||||
# Restart Forgejo with the new version
|
# Restart Forgejo with the new version
|
||||||
log "Restarting Forgejo with the new version..."
|
log "Restarting Forgejo with the new version..."
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue