name: Build AppImage
on:
  push:
    branches:  
    - main
  pull_request:
    branches:
    - "*"
concurrency:
  group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
  cancel-in-progress: true
jobs:
  appimage:
    name: Build AppImage
    runs-on: ubuntu-latest
    container: docker
    steps:
    - uses: actions/checkout@v4
    - name: Build AppImage
      run: |
        docker build -t appimage-builder . -f burrow-gtk/build-aux/Dockerfile
        docker create --name temp appimage-builder
        docker cp temp:/app/burrow-gtk/build-appimage/Burrow-x86_64.AppImage .
        docker rm temp
    - uses: actions/upload-artifact@v4
      name: Upload to GitHub
      with:
        name: AppImage
        path: Burrow-x86_64.AppImage
