factoriotools / factorio-docker

Factorio headless server in a Docker container
https://hub.docker.com/r/factoriotools/factorio/
MIT License
926 stars 219 forks source link

buildinfo.json content is deleted (accidentally?) #467

Closed BlackCorsair closed 1 year ago

BlackCorsair commented 1 year ago

Hi, I think that your automations in the github repo broke the buildinfo.json file, specifically in this commit: https://github.com/factoriotools/factorio-docker/commit/dfd442dfdaf3d93c3f2ceb9e14e74cf7c73276e6

The file is empty now.

PD: awesome work btw

BR

Fank commented 1 year ago

@KagurazakaNyaa any idea?

Fank commented 1 year ago

It looks like https://github.com/factoriotools/factorio-docker/actions/runs/4957763182/jobs/8869833825 caused it:

2023-05-12T10:18:23.7801222Z ##[group]Run ./update.sh
2023-05-12T10:18:23.7801662Z ./update.sh
2023-05-12T10:18:23.7869377Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
2023-05-12T10:18:23.7869754Z ##[endgroup]
2023-05-12T10:18:23.8178605Z   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
2023-05-12T10:18:23.8184726Z                                  Dload  Upload   Total   Spent    Left  Speed
2023-05-12T10:18:23.8186334Z 
2023-05-12T10:18:25.0694729Z   0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
2023-05-12T10:18:26.0706573Z   0     0    0     0    0     0      0      0 --:--:--  0:00:01 --:--:--     0
2023-05-12T10:18:27.0720502Z   0     0    0     0    0     0      0      0 --:--:--  0:00:02 --:--:--     0
2023-05-12T10:18:27.6454403Z   0     0    0     0    0     0      0      0 --:--:--  0:00:03 --:--:--     0
2023-05-12T10:18:27.6455301Z   0     0    0     0    0     0      0      0 --:--:--  0:00:03 --:--:--     0
2023-05-12T10:18:27.6456342Z   0     0    0     0    0     0      0      0 --:--:--  0:00:03 --:--:--     0
2023-05-12T10:18:27.6578670Z   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
2023-05-12T10:18:27.6582722Z                                  Dload  Upload   Total   Spent    Left  Speed
2023-05-12T10:18:27.6584352Z 
2023-05-12T10:18:28.8603208Z   0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
2023-05-12T10:18:29.7879875Z   0     0    0     0    0     0      0      0 --:--:--  0:00:01 --:--:--     0
2023-05-12T10:18:29.7881497Z   0     0    0     0    0     0      0      0 --:--:--  0:00:02 --:--:--     0
2023-05-12T10:18:29.7882558Z   0     0    0     0    0     0      0      0 --:--:--  0:00:02 --:--:--     0
2023-05-12T10:18:29.8220976Z version: currentversion:1.1.80
2023-05-12T10:18:29.8250520Z versionShort=. currentversionShort=1.1
2023-05-12T10:18:29.8587387Z jq: error: sha256/0 is not defined at <top-level>, line 1:
2023-05-12T10:18:29.8588061Z sha256
2023-05-12T10:18:29.8592154Z jq: 1 compile error
2023-05-12T10:18:29.9102529Z [master dfd442d] Auto Update Factorio to version:
2023-05-12T10:18:29.9103421Z  2 files changed, 69 deletions(-)
2023-05-12T10:18:30.4502674Z remote: Resolving deltas:   0% (0/2)        
2023-05-12T10:18:30.4519034Z remote: Resolving deltas:  50% (1/2)        
2023-05-12T10:18:30.4519392Z remote: Resolving deltas: 100% (2/2)        
2023-05-12T10:18:30.4519764Z remote: Resolving deltas: 100% (2/2), completed with 2 local objects.        
2023-05-12T10:18:30.8630628Z To https://github.com/factoriotools/factorio-docker
2023-05-12T10:18:30.8631992Z    f262181..dfd442d  master -> master
2023-05-12T10:18:31.7718275Z To https://github.com/factoriotools/factorio-docker
2023-05-12T10:18:31.7720062Z  + 4fe8b3d...dfd442d latest -> latest (forced update)
2023-05-12T10:18:31.7835218Z Post job cleanup.
2023-05-12T10:18:31.8981554Z [command]/usr/bin/git version
2023-05-12T10:18:31.9036050Z git version 2.40.1
KagurazakaNyaa commented 1 year ago

It seems that there is an error in getting the factorio version, we should revert this commit, and then modify the script to make it fail correctly when it fails instead of continuing to perform subsequent operations. set -e should be a good way.