diff options
| author | Stefan Boberg <[email protected]> | 2026-03-16 13:47:58 +0100 |
|---|---|---|
| committer | GitHub Enterprise <[email protected]> | 2026-03-16 13:47:58 +0100 |
| commit | 176260a62242806d700fc3179d55edfef6ec8801 (patch) | |
| tree | f6df7d55618532dcac6a1b9b91c24d681ee0eeda | |
| parent | Restructure zen builds using subcommands (#834) (diff) | |
| download | zen-176260a62242806d700fc3179d55edfef6ec8801.tar.xz zen-176260a62242806d700fc3179d55edfef6ec8801.zip | |
Push Docker images to ECR after building (#845)
- Add ECR login via aws CLI (using IMDS credentials)
- Tag and push images to 728559092788.dkr.ecr.us-east-1.amazonaws.com/zenserver
- Use tag suffixes (-wine, -linux) to discriminate image variants
- Replace read-file-action with shell equivalent for VERSION.txt
- Enable docker-build and artifact uploads on all branches for validation
| -rw-r--r-- | .github/workflows/create_release.yml | 24 | ||||
| -rw-r--r-- | .github/workflows/validate.yml | 14 |
2 files changed, 21 insertions, 17 deletions
diff --git a/.github/workflows/create_release.yml b/.github/workflows/create_release.yml index 6d6a15bfc..bc621ad23 100644 --- a/.github/workflows/create_release.yml +++ b/.github/workflows/create_release.yml @@ -138,9 +138,7 @@ jobs: - name: Read VERSION.txt id: read_version - uses: ue-foundation/[email protected] - with: - path: "./VERSION.txt" + run: echo "content=$(cat VERSION.txt)" >> "$GITHUB_OUTPUT" - name: Download Linux bundle uses: actions/download-artifact@v1 @@ -163,25 +161,25 @@ jobs: unzip artifacts/win64/zenserver-win64.zip -d artifacts/win-extracted cp artifacts/win-extracted/zenserver.exe build/win-binary-staging/ - - name: Build Docker image (with Wine + Windows binary) + - name: Login to Amazon ECR + run: | + aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin 728559092788.dkr.ecr.us-east-1.amazonaws.com + + - name: Build and push Docker image (with Wine + Windows binary) run: | docker build \ - -t zenserver-compute:${{ steps.read_version.outputs.content }} \ + -t 728559092788.dkr.ecr.us-east-1.amazonaws.com/zenserver:${{ steps.read_version.outputs.content }}-wine \ --build-arg WIN_BINARY_DIR=build/win-binary-staging \ -f docker/Dockerfile . + docker push 728559092788.dkr.ecr.us-east-1.amazonaws.com/zenserver:${{ steps.read_version.outputs.content }}-wine - - name: Build Docker image (Linux only, no Wine) + - name: Build and push Docker image (Linux only, no Wine) run: | docker build \ - -t zenserver-compute-linux:${{ steps.read_version.outputs.content }} \ + -t 728559092788.dkr.ecr.us-east-1.amazonaws.com/zenserver:${{ steps.read_version.outputs.content }}-linux \ --build-arg INSTALL_WINE=false \ -f docker/Dockerfile . - - # TODO: Push images to container registry - # - name: Push images - # run: | - # docker push zenserver-compute:${{ steps.read_version.outputs.content }} - # docker push zenserver-compute-linux:${{ steps.read_version.outputs.content }} + docker push 728559092788.dkr.ecr.us-east-1.amazonaws.com/zenserver:${{ steps.read_version.outputs.content }}-linux create-release: runs-on: [linux, x64, zen] diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index dfdb9677d..2c99e8a46 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -279,16 +279,22 @@ jobs: unzip artifacts/win64/zenserver-win64.zip -d artifacts/win-extracted cp artifacts/win-extracted/zenserver.exe build/win-binary-staging/ - - name: Build Docker image (with Wine + Windows binary) + - name: Login to Amazon ECR + run: | + aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin 728559092788.dkr.ecr.us-east-1.amazonaws.com + + - name: Build and push Docker image (with Wine + Windows binary) run: | docker build \ - -t zenserver-compute:latest \ + -t 728559092788.dkr.ecr.us-east-1.amazonaws.com/zenserver:latest-wine \ --build-arg WIN_BINARY_DIR=build/win-binary-staging \ -f docker/Dockerfile . + docker push 728559092788.dkr.ecr.us-east-1.amazonaws.com/zenserver:latest-wine - - name: Build Docker image (Linux only, no Wine) + - name: Build and push Docker image (Linux only, no Wine) run: | docker build \ - -t zenserver-compute-linux:latest \ + -t 728559092788.dkr.ecr.us-east-1.amazonaws.com/zenserver:latest-linux \ --build-arg INSTALL_WINE=false \ -f docker/Dockerfile . + docker push 728559092788.dkr.ecr.us-east-1.amazonaws.com/zenserver:latest-linux |