2025-01-09 11:13:16 +00:00
|
|
|
name: Build and Release Lindbergh
|
2024-02-04 19:38:44 +00:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
2025-01-09 11:14:04 +00:00
|
|
|
- master
|
2025-01-09 11:13:16 +00:00
|
|
|
pull_request:
|
|
|
|
branches:
|
2025-01-09 11:14:04 +00:00
|
|
|
- master
|
2024-02-04 19:38:44 +00:00
|
|
|
|
2025-01-09 11:16:51 +00:00
|
|
|
permissions:
|
|
|
|
contents: write
|
|
|
|
|
2024-02-04 19:38:44 +00:00
|
|
|
jobs:
|
2025-01-09 11:20:01 +00:00
|
|
|
build:
|
2024-02-04 19:38:44 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2025-01-09 11:13:16 +00:00
|
|
|
- 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 .
|
|
|
|
|
2025-01-09 11:20:01 +00:00
|
|
|
- name: Extract build artifacts
|
2025-01-09 11:13:16 +00:00
|
|
|
run: |
|
|
|
|
docker create --name lindbergh-builder lindbergh-loader
|
2025-01-09 11:20:01 +00:00
|
|
|
docker cp lindbergh-builder:/output ./build
|
2025-01-09 11:13:16 +00:00
|
|
|
docker rm lindbergh-builder
|
|
|
|
|
|
|
|
- name: Archive build directory
|
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
|
|
|
name: build-output
|
|
|
|
path: ./build
|
|
|
|
|
2025-01-09 11:20:01 +00:00
|
|
|
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
|
|
|
|
|
2025-01-09 11:13:16 +00:00
|
|
|
- name: Create Release
|
|
|
|
uses: actions/create-release@v1
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
|
|
|
tag_name: v${{ github.run_number }}
|
2025-01-09 11:20:32 +00:00
|
|
|
release_name: "Lindbergh Loader v${{ github.run_number }}"
|
2025-01-09 11:13:16 +00:00
|
|
|
draft: false
|
|
|
|
prerelease: false
|
2024-02-04 19:38:44 +00:00
|
|
|
|
2025-01-09 11:13:16 +00:00
|
|
|
- name: Upload Release Asset
|
|
|
|
uses: actions/upload-release-asset@v1
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
2024-02-04 19:38:44 +00:00
|
|
|
with:
|
2025-01-09 11:13:16 +00:00
|
|
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
|
|
asset_path: ./build
|
|
|
|
asset_name: build.tar.gz
|
|
|
|
asset_content_type: application/gzip
|