builds godot
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: Build upload docker image
description: Build and upload docker image to ghcr.io

inputs:
  github-token:
    required: true
    description: GitHub token
  name:
    required: true
    description: Name of the package
    default: godot-2d

runs:
  using: "composite"
  steps:
    - uses: actions/checkout@v3

    - name: Get version
      uses: bend-n/godot-builds/.github/actions/get-version@main

    - name: Get templates
      uses: actions/download-artifact@v4
      with:
        name: templates

    - name: Get headless editor
      uses: actions/download-artifact@v4
      with:
        name: server-editor-release

    - name: List all downloaded files
      run: ls -R
      shell: bash

    - run: mv godot_server.x11.opt.tools.64 godot && chmod -v +x godot
      shell: bash

    - name: Login to GitHub Container Registry
      uses: docker/login-action@v2
      with:
        registry: ghcr.io
        username: ${{ github.repository_owner }}
        password: ${{ inputs.github-token }}

    - name: Build and push Docker image
      uses: docker/build-push-action@v3
      with:
        context: .
        file: Dockerfile
        push: true
        tags: ghcr.io/${{ github.repository_owner }}/${{ inputs.name }}:${{ env.release-name }}
        build-args: |
          GODOT_VERSION=${{ env.version-name }}
          RELEASE_NAME=${{ env.release }}