Compare commits

..
2 Commits
Author SHA1 Message Date
Bobby Dilley 6d799d7524 Update ci.yml 2025-01-09 11:30:00 +00:00
Bobby Dilley 73d0c9fb57 Update ci.yml 2025-01-09 11:26:02 +00:00
+11 -13
View File
@@ -12,52 +12,50 @@ permissions:
contents: write contents: write
jobs: jobs:
build: build-and-release:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
# Checkout the repository
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v3 uses: actions/checkout@v3
# Set up Docker Buildx
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2 uses: docker/setup-buildx-action@v2
# Build the Docker image
- name: Build Docker image - name: Build Docker image
run: | run: |
docker build --target lindbergh-build -t lindbergh-loader . docker build --target lindbergh-build -t lindbergh-loader .
# Extract build artifacts
- name: Extract build artifacts - name: Extract build artifacts
run: | run: |
docker create --name lindbergh-builder lindbergh-loader docker create --name lindbergh-builder lindbergh-loader
docker cp lindbergh-builder:/output ./build docker cp lindbergh-builder:/output ./build
docker rm lindbergh-builder docker rm lindbergh-builder
# Archive the build directory
- name: Archive build directory - name: Archive build directory
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
with: with:
name: build-output name: build-output
path: ./build path: ./build
release: # Create a GitHub release and capture the upload URL
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 - name: Create Release
id: create_release # Assign an ID to reference the output
uses: actions/create-release@v1 uses: actions/create-release@v1
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with: with:
tag_name: v${{ github.run_number }} tag_name: v${{ github.run_number }}
release_name: "Lindbergh Loader v${{ github.run_number }}" release_name: "Build v${{ github.run_number }}"
draft: false draft: false
prerelease: false prerelease: false
# Upload the build artifact to the release
- name: Upload Release Asset - name: Upload Release Asset
uses: actions/upload-release-asset@v1 uses: actions/upload-release-asset@v1
env: env: