-
-
Notifications
You must be signed in to change notification settings - Fork 79
Automatic Docker release builds #1922
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,81 @@ | ||
| # Copyright 2025 Overte e.V. | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| # Created 2025-11-23 by Julian Groß. | ||
|
|
||
| name: Docker server release build | ||
| # This workflow runs https://github.com/overte-org/overte-domain-server-docker on every tagged release. | ||
| # The latest tag is not automatically updated. | ||
|
|
||
| on: | ||
| push: | ||
|
RTUnreal marked this conversation as resolved.
|
||
| tags: | ||
| # Release tags. E.g. 2024.06.1 | ||
| # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet | ||
| - "[0-9][0-9][0-9][0-9].[0-9][0-9].**" | ||
|
|
||
| jobs: | ||
| build: | ||
| name: "${{matrix.os}} Docker" | ||
| strategy: | ||
| matrix: | ||
| include: | ||
| - os: Ubuntu amd64 | ||
| runner: ubuntu-latest # Which GitHub Actions Runner to use. | ||
| arch: amd64 # Used for naming Docker images. | ||
| - os: Ubuntu aarch64 | ||
| runner: ubuntu-24.04-arm | ||
| arch: aarch64 | ||
| fail-fast: false | ||
| runs-on: ${{matrix.runner}} | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
| with: | ||
| submodules: false | ||
| fetch-depth: 1 | ||
| # We only check out the Dockerfiles. The main source gets pulled by the Dockerfiles themselves. | ||
| repository: "overte-org/overte-domain-server-docker" | ||
|
|
||
| - name: Login to Docker Hub | ||
| uses: docker/login-action@v3 | ||
| with: | ||
| username: ${{ secrets.DOCKER_HUB_ACCOUNT }} | ||
| password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | ||
|
|
||
| - name: Build server | ||
| shell: bash | ||
| # Using the previously checked out Docker files. | ||
| run: docker build --no-cache --build-arg "TAG=${{ github.ref_name }}" --build-arg "REPO=https://github.com/${{ github.repository }}.git" -t domain-server-builder -f ./Dockerfile.build . | ||
|
JulianGro marked this conversation as resolved.
|
||
|
|
||
| - name: Deploy server into runtime image | ||
| shell: bash | ||
| run: docker build --no-cache -t overte/overte-server:${{ github.ref_name }}-${{ matrix.arch }} -f ./Dockerfile.runtime . | ||
|
|
||
| - name: Push image | ||
| shell: bash | ||
| run: docker push overte/overte-server:${{ github.ref_name }}-${{ matrix.arch }} | ||
|
|
||
| # This Job runs after the matrix is finished. | ||
| manifest: | ||
| name: Create and push manifests | ||
| needs: [build] # Depend on the build job finishing first. | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Login to Docker Hub | ||
| uses: docker/login-action@v3 | ||
| with: | ||
| username: ${{ secrets.DOCKER_HUB_ACCOUNT }} | ||
| password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | ||
|
|
||
| - name: Create and push manifests | ||
| shell: bash | ||
| run: | | ||
| docker manifest create overte/overte-server:${{ github.ref_name }} overte/overte-server:${{ github.ref_name }}-amd64 overte/overte-server:${{ github.ref_name }}-aarch64 | ||
| docker manifest push overte/overte-server:${{ github.ref_name }} | ||
|
|
||
| # We don't update the latest tag automatically, since this could be an experimental build. | ||
| - name: Don't forget to update the latest tag! | ||
| shell: bash | ||
| run: | | ||
| echo "docker manifest rm overte/overte-server:latest" | ||
| echo "docker manifest create overte/overte-server:latest overte/overte-server:${{ github.ref_name }}-amd64 overte/overte-server:${{ github.ref_name }}-aarch64" | ||
| echo "docker manifest push overte/overte-server:latest" | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.