builds godot
Diffstat (limited to '.github/actions/build-upload-image/action.yml')
| -rw-r--r-- | .github/actions/build-upload-image/action.yml | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/.github/actions/build-upload-image/action.yml b/.github/actions/build-upload-image/action.yml new file mode 100644 index 0000000..651f99c --- /dev/null +++ b/.github/actions/build-upload-image/action.yml @@ -0,0 +1,48 @@ +name: Build upload docker image +description: Build and upload docker image to ghcr.io + +inputs: + github-token: + required: true + description: GitHub token + +runs: + using: "composite" + steps: + - uses: actions/checkout@v3 + + - name: Get version + uses: bend-n/godot-2d-builds/.github/actions/get-version@main + + - name: Get templates + uses: actions/download-artifact@v3 + with: + name: templates + + - name: Get headless + uses: actions/download-artifact@v3 + with: + name: server-tools-release + + - run: mv godot_server.x11.opt.tools.64 godot && chmod -v +x godot + shell: bash + + - name: Login to GitHub Container Registry + uses: docker/[email protected] + 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 }}/godot-2d:${{ env.version-name }}${{ env.tag }} + build-args: | + GODOT_VERSION=${{ env.version-name }} + RELEASE_NAME=${{ env.release }} + env: + tag: ${{ env.release != 'stable' && format('.{0}', env.release) || '' }} |