Skip to content

Commit 0bc1d3a

Browse files
Remove hardcoding of mediawiki version (#512)
* Remove hardcoding of mediawiki version * Extract MW_VERSION from docker image
1 parent 39939d8 commit 0bc1d3a

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

.github/workflows/docker-image.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,15 @@ jobs:
4141
steps:
4242
- name: Checkout
4343
uses: actions/checkout@v3
44+
-
45+
name: Extract MW_VERSION from parent Docker image
46+
id: extract_mw
47+
run: |
48+
docker build -t temp-image .
49+
MW_VERSION=$(docker run --rm temp-image env | grep ^MW_CORE_VERSION= | cut -d '=' -f2-)
50+
echo "MW_VERSION=$MW_VERSION"
51+
echo "MW_VERSION=$MW_VERSION" >> $GITHUB_ENV
52+
4453
-
4554
name: Generate tags
4655
id: generate
@@ -52,8 +61,7 @@ jobs:
5261
# Date
5362
BDATE=$(date +%Y%m%d)
5463
55-
# We don't compute the MW version here, we just hardcode it
56-
MEDIAWIKI_VERSION=1.43.3
64+
MEDIAWIKI_VERSION=${{ env.MW_VERSION }}
5765
# Extract MW major version (like 1.43)
5866
MEDIAWIKI_MAJOR_VERSION=${MEDIAWIKI_VERSION%.*}
5967

0 commit comments

Comments
 (0)