Compare commits

...

7 Commits

Author SHA1 Message Date
da49c13bb7 Fixed tag match in update
Took 38 minutes
2024-10-22 07:37:00 +02:00
a8ecb01f4c Bump peter-evans/dockerhub-description from 2.4.1 to 4.0.0 (#512)
Bumps [peter-evans/dockerhub-description](https://github.com/peter-evans/dockerhub-description) from 2.4.1 to 4.0.0.
- [Release notes](https://github.com/peter-evans/dockerhub-description/releases)
- [Commits](https://github.com/peter-evans/dockerhub-description/compare/v2.4.1...v4.0.0)

---
updated-dependencies:
- dependency-name: peter-evans/dockerhub-description
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-22 06:48:30 +02:00
6692bb514d Bump actions/checkout from 2 to 4 (#513)
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-22 06:48:03 +02:00
2d805feb4f Cleanup github workflows
Took 9 minutes
2024-10-22 06:46:18 +02:00
bc2dc44cad Removed old 2.0.7 release
Related #511
2024-10-22 06:35:03 +02:00
04085ef23d Auto Update Factorio to stable version: 2.0.8 experimental version: 2.0.8 2024-10-21 21:20:17 +00:00
fbb787e535 Auto Update Factorio to stable version: 2.0.7 experimental version: 2.0.8 2024-10-21 18:30:01 +00:00
10 changed files with 48 additions and 50 deletions

View File

@ -1,7 +1,11 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
- package-ecosystem: docker
directory: "/docker"
schedule:
interval: daily
open-pull-requests-limit: 10
interval: "daily"

View File

@ -4,15 +4,21 @@ on:
push:
branches:
- master
tags:
- latest
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: build and push
if: ${{ env.DOCKER_USERNAME != '' && env.DOCKER_PASSWORD != '' }}
env:

View File

@ -10,9 +10,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Docker Hub Description
uses: peter-evans/dockerhub-description@v2.4.1
uses: peter-evans/dockerhub-description@v4.0.0
if: ${{ env.DOCKER_USERNAME != '' && env.DOCKER_PASSWORD != '' }}
env:
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}

View File

@ -1,22 +0,0 @@
name: Docker build
on:
pull_request:
push:
tags:
- latest
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: build
env:
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
run: |
./build.py --multiarch

View File

@ -10,7 +10,9 @@ jobs:
shellcheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Checkout
uses: actions/checkout@v4
- name: shellcheck
uses: reviewdog/action-shellcheck@v1
with:
@ -20,7 +22,9 @@ jobs:
hadolint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Checkout
uses: actions/checkout@v4
- name: hadolint
uses: reviewdog/action-hadolint@v1
with:

View File

@ -4,20 +4,15 @@ on:
schedule:
- cron: "0 * * * *"
workflow_dispatch:
inputs:
desc:
description: "desc"
required: false
jobs:
build:
check:
runs-on: ubuntu-latest
if: github.event_name != 'schedule' || (github.event_name == 'schedule' && github.repository == 'factoriotools/factorio-docker')
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.REPO_TOKEN }}
- name: Checkout
uses: actions/checkout@v4
- name: Run update script
run: ./update.sh

View File

@ -6,7 +6,8 @@
[中文](./README_zh_CN.md)
<!-- start autogeneration tags -->
* `2`, `2.0`, `2.0.7`, `latest`, `stable`, `stable-2.0.7`
* `2`, `2.0`, `2.0.8`, `latest`, `stable`, `stable-2.0.8`
* `2`, `2.0`, `2.0.7`, `stable`, `stable-2.0.7`
* `1`, `1.1`, `1.1.110`, `stable-1.1.110`
* `1.0`, `1.0.0`
* `0.17`, `0.17.79`

View File

@ -57,15 +57,15 @@
"1.1.110"
]
},
"2.0.7": {
"sha256": "e6a64a9ee5b1d3773cd1f40aa5cf78e91960eade6c508fd365c34752afdf2762",
"2.0.8": {
"sha256": "d9594c4d552a3e4f965b188a4774da8c8b010fc23ddb0efc63b1d94818dde1ca",
"tags": [
"latest",
"stable",
"stable-2.0.7",
"stable-2.0.8",
"2",
"2.0",
"2.0.7"
"2.0.8"
]
}
}

View File

@ -6,8 +6,8 @@ services:
args:
# Check buildinfo.json for supported versions and SHAs
# https://github.com/factoriotools/factorio-docker/blob/master/buildinfo.json
- VERSION=2.0.7
- SHA256=e6a64a9ee5b1d3773cd1f40aa5cf78e91960eade6c508fd365c34752afdf2762
- VERSION=2.0.8
- SHA256=d9594c4d552a3e4f965b188a4774da8c8b010fc23ddb0efc63b1d94818dde1ca
ports:
- "34197:34197/udp"
- "27015:27015/tcp"

View File

@ -4,12 +4,16 @@ SEMVER_REGEX="^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)$"
stable_online_version=$(curl 'https://factorio.com/api/latest-releases' | jq '.stable.headless' -r)
experimental_online_version=$(curl 'https://factorio.com/api/latest-releases' | jq '.experimental.headless' -r)
stable_sha256=$(curl "https://factorio.com/download/sha256sums/" | grep -E "(factorio_headless_x64_|factorio-headless_linux_)${stable_online_version}.tar.xz" | awk '{print $1}')
experimental_sha256=$(curl "https://factorio.com/download/sha256sums/" | grep -E "(factorio_headless_x64_|factorio-headless_linux_)${experimental_online_version}.tar.xz" | awk '{print $1}')
stable_current_version=$(jq 'with_entries(select(contains({value:{tags:["stable"]}}))) | keys | .[0]' buildinfo.json -r)
latest_current_version=$(jq 'with_entries(select(contains({value:{tags:["latest"]}}))) | keys | .[0]' buildinfo.json -r)
stable_current_version=$(jq 'with_entries(select(.value.tags | index("stable"))) | keys | .[0]' buildinfo.json -r)
latest_current_version=$(jq 'with_entries(select(.value.tags | index("latest"))) | keys | .[0]' buildinfo.json -r)
echo "stable_online_version=${stable_online_version} experimental_online_version=${experimental_online_version}"
echo "stable_current_version=${stable_current_version} latest_current_version=${latest_current_version}"
if [[ -z "${stable_online_version}" ]] || [[ -z "${experimental_online_version}" ]]; then
exit
fi
@ -57,6 +61,11 @@ echo "stableCurrentVersionShort=${stableCurrentVersionShort} latestCurrentVersio
tmpfile=$(mktemp)
# Remove stable tag
cp buildinfo.json "$tmpfile"
jq --arg stable_current_version "$stable_current_version" 'with_entries(if .key == $stable_current_version then .value.tags |= . - ["stable"] else . end)' "$tmpfile" > buildinfo.json
rm -f -- "$tmpfile"
# Remove latest tag
cp buildinfo.json "$tmpfile"
jq --arg latest_current_version "$latest_current_version" 'with_entries(if .key == $latest_current_version then .value.tags |= . - ["latest"] else . end)' "$tmpfile" > buildinfo.json