1
0
mirror of synced 2025-02-24 14:13:17 +01:00
2025-01-09 11:20:32 +00:00

70 lines
1.7 KiB
YAML

name: Build and Release Lindbergh
on:
push:
branches:
- master
pull_request:
branches:
- master
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build Docker image
run: |
docker build --target lindbergh-build -t lindbergh-loader .
- name: Extract build artifacts
run: |
docker create --name lindbergh-builder lindbergh-loader
docker cp lindbergh-builder:/output ./build
docker rm lindbergh-builder
- name: Archive build directory
uses: actions/upload-artifact@v3
with:
name: build-output
path: ./build
release:
if: github.event_name == 'push'
needs: build
runs-on: ubuntu-latest
steps:
- name: Download build artifact
uses: actions/download-artifact@v3
with:
name: build-output
path: ./build
- name: Create Release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ github.run_number }}
release_name: "Lindbergh Loader v${{ github.run_number }}"
draft: false
prerelease: false
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./build
asset_name: build.tar.gz
asset_content_type: application/gzip