Skip to content

build(tiledit): use a docker image to build #10

build(tiledit): use a docker image to build

build(tiledit): use a docker image to build #10

Workflow file for this run

name: Build Docker image
# Based on https://github.com/Delgan/qml-format/blob/a57ccf9991ca3e210d2ec3c97156c5fb4bb66227/.github/workflows/docker.yml (Thanks!)
on:
workflow_dispatch:
pull_request:
branches: ["main"]
paths:
- sirc-tiledit/docker/**
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}-tiledit-build
jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: sirc-tiledit/docker/
file: sirc-tiledit/docker/builder.Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}