From d634a84e0f7ed3317b594fed3be2f6a2d5991f37 Mon Sep 17 00:00:00 2001 From: Owen Date: Sun, 6 Aug 2023 12:55:55 -0400 Subject: [PATCH] feat: Auto-update docker-compose.yml (#472) Update docker-compose.yml with the latest stable version. Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- docker/docker-compose.yml | 14 +++++++------- update.sh | 6 ++++++ 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 53eef67..cd021ea 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -4,15 +4,15 @@ services: build: context: . args: - # Check buildinfo.json for supported versions and SHAs - # https://github.com/factoriotools/factorio-docker/blob/master/buildinfo.json - - VERSION=1.1.61 - - SHA256=68e4ac8d33b195701c15a23e3d8e65676ef8be25f140657678122f211c60b659 + # Check buildinfo.json for supported versions and SHAs + # https://github.com/factoriotools/factorio-docker/blob/master/buildinfo.json + - VERSION=1.1.87 + - SHA256=60b3884b6dad1f4c7b30b7ef2b63619ff4a3204ac7fd894cf09d382b349857cc ports: - - "34197:34197/udp" - - "27015:27015/tcp" + - "34197:34197/udp" + - "27015:27015/tcp" volumes: - - /opt/factorio:/factorio + - /opt/factorio:/factorio # environment: # - PUID=1000 # - PGID=1000 diff --git a/update.sh b/update.sh index 18c6515..fa70ebe 100755 --- a/update.sh +++ b/update.sh @@ -89,11 +89,17 @@ done && printf "%s\n\n" "$tags")) perl -i -0777 -pe "s/.+/$readme_tags/s" README.md +# Replace VERSION and SHA256 args in docker-compose.yaml with latest stable values. +docker_compose_path="docker/docker-compose.yml" +sov="VERSION=${stable_online_version}" yq -i '.services.factorio.build.args[0] = env(sov)' "$docker_compose_path" +sha="SHA256=${stable_sha256}" yq -i '.services.factorio.build.args[1] = env(sha)' "$docker_compose_path" + git config user.name github-actions[bot] git config user.email 41898282+github-actions[bot]@users.noreply.github.com git add buildinfo.json git add README.md +git add docker/docker-compose.yml git commit -a -m "Auto Update Factorio to stable version: ${stable_online_version} experimental version: ${experimental_online_version}" git tag -f latest