Document integer data types and ranges in Lua API #6553
Workflow file for this run
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
| --- | |
| name: docker_image | |
| # https://docs.github.com/en/actions/publishing-packages/publishing-docker-images | |
| # https://docs.docker.com/build/ci/github-actions/multi-platform | |
| # https://github.com/opencontainers/image-spec/blob/main/annotations.md | |
| on: | |
| push: | |
| branches: [ "master" ] | |
| # Publish semver tags as releases. | |
| tags: [ "*" ] | |
| pull_request: | |
| # Build docker image on pull requests. (but do not publish) | |
| paths: | |
| - 'lib/**.[ch]' | |
| - 'lib/**.cpp' | |
| - 'src/**.[ch]' | |
| - 'src/**.cpp' | |
| - 'irr/**.[ch]' | |
| - 'irr/**.cpp' | |
| - '**/CMakeLists.txt' | |
| - 'cmake/Modules/**' | |
| - 'util/ci/**' | |
| - 'misc/irrlichtmt_tag.txt' | |
| - 'Dockerfile' | |
| - '.dockerignore' | |
| - '.github/workflows/docker_image.yml' | |
| workflow_dispatch: | |
| inputs: | |
| use_cache: | |
| description: "Use build cache" | |
| required: true | |
| type: boolean | |
| default: true | |
| env: | |
| REGISTRY: ghcr.io | |
| # github.repository as <account>/<repo> | |
| # sadly there is no way to lowercase the string, so in some occurences we have to do it in a dedicated step | |
| IMAGE_NAME: ${{ github.repository }} | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.platform == 'linux/amd64' && 'ubuntu-24.04' || 'ubuntu-24.04-arm' }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| platform: | |
| - linux/amd64 | |
| - linux/arm64 | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v6 | |
| - name: Prepare | |
| run: | | |
| platform=${{ matrix.platform }} | |
| echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV | |
| - name: Setup Docker buildx | |
| uses: docker/setup-buildx-action@v3.12.0 | |
| # Extract metadata (tags, labels, annotations) for Docker | |
| # https://github.com/docker/metadata-action | |
| - name: Extract Docker metadata | |
| id: meta | |
| uses: docker/metadata-action@v5.10.0 | |
| with: | |
| images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | |
| labels: | | |
| org.opencontainers.image.title=Luanti | |
| org.opencontainers.image.vendor=Luanti | |
| org.opencontainers.image.description=Luanti (formerly Minetest) is an open source voxel game-creation platform with easy modding and game creation | |
| org.opencontainers.image.licenses=LGPL-2.1-only | |
| annotations: | | |
| org.opencontainers.image.title=Luanti | |
| org.opencontainers.image.vendor=Luanti | |
| org.opencontainers.image.description=Luanti (formerly Minetest) is an open source voxel game-creation platform with easy modding and game creation | |
| org.opencontainers.image.licenses=LGPL-2.1-only | |
| # Login against the Docker registry except on PR | |
| # https://github.com/docker/login-action | |
| - name: Log into registry ${{ env.REGISTRY }} | |
| if: github.event_name != 'pull_request' | |
| uses: docker/login-action@v3.6.0 | |
| with: | |
| registry: ${{ env.REGISTRY }} | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Get image name | |
| run: | |
| echo "IMAGE_NAME_LOWERCASE"="${IMAGE_NAME,,}" >> $GITHUB_ENV | |
| - name: Build and push by digest | |
| id: build | |
| uses: docker/build-push-action@v6.18.0 | |
| with: | |
| context: . | |
| platforms: ${{ matrix.platform }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| annotations: ${{ steps.meta.outputs.annotations }} | |
| tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME_LOWERCASE }} | |
| outputs: type=image,push-by-digest=true,name-canonical=true,push=${{ github.event_name != 'pull_request' }} | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| no-cache: ${{ (github.event_name == 'workflow_dispatch' && !inputs.use_cache) || startsWith(github.ref, 'refs/tags/') }} | |
| - name: Export digest | |
| if: github.event_name != 'pull_request' | |
| run: | | |
| mkdir -p ${{ runner.temp }}/digests | |
| digest="${{ steps.build.outputs.digest }}" | |
| touch "${{ runner.temp }}/digests/${digest#sha256:}" | |
| - name: Upload digest | |
| uses: actions/upload-artifact@v6 | |
| if: github.event_name != 'pull_request' | |
| with: | |
| name: digests-${{ env.PLATFORM_PAIR }} | |
| path: ${{ runner.temp }}/digests/* | |
| if-no-files-found: error | |
| retention-days: 1 | |
| push: | |
| runs-on: ubuntu-24.04 | |
| needs: build | |
| if: github.event_name != 'pull_request' | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - name: Download digests | |
| uses: actions/download-artifact@v7 | |
| with: | |
| path: ${{ runner.temp }}/digests | |
| pattern: digests-* | |
| merge-multiple: true | |
| - name: Get image name | |
| run: | |
| echo "IMAGE_NAME_LOWERCASE"="${IMAGE_NAME,,}" >> $GITHUB_ENV | |
| # Login against the Docker registry except on PR | |
| # https://github.com/docker/login-action | |
| - name: Log into registry ${{ env.REGISTRY }} | |
| uses: docker/login-action@v3.6.0 | |
| with: | |
| registry: ${{ env.REGISTRY }} | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Setup Docker buildx | |
| uses: docker/setup-buildx-action@v3.12.0 | |
| # Extract metadata (tags, labels, annotations) for Docker | |
| # https://github.com/docker/metadata-action | |
| - name: Extract Docker metadata | |
| id: meta | |
| uses: docker/metadata-action@v5.10.0 | |
| with: | |
| images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | |
| labels: | | |
| org.opencontainers.image.title=Luanti | |
| org.opencontainers.image.vendor=Luanti | |
| org.opencontainers.image.description=Luanti (formerly Minetest) is an open source voxel game-creation platform with easy modding and game creation | |
| org.opencontainers.image.licenses=LGPL-2.1-only | |
| annotations: | | |
| org.opencontainers.image.title=Luanti | |
| org.opencontainers.image.vendor=Luanti | |
| org.opencontainers.image.description=Luanti (formerly Minetest) is an open source voxel game-creation platform with easy modding and game creation | |
| org.opencontainers.image.licenses=LGPL-2.1-only | |
| - name: Create manifest list and push | |
| working-directory: ${{ runner.temp }}/digests | |
| run: | | |
| docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \ | |
| $(printf '${{ env.REGISTRY }}/${{ env.IMAGE_NAME_LOWERCASE }}@sha256:%s ' *) | |
| - name: Inspect image | |
| run: | | |
| docker buildx imagetools inspect ${{ env.REGISTRY }}/${{ env.IMAGE_NAME_LOWERCASE }}:${{ steps.meta.outputs.version }} |