Skip to content

Build and Create AppImage #15

Build and Create AppImage

Build and Create AppImage #15

Workflow file for this run

name: Build and Create AppImage
# Define a manual trigger with input for version
on:
workflow_dispatch:
inputs:
version:
description: 'The version for the release'
required: true
default: 'v2.0.0'
release_notes:
description: 'Release notes or description for this version'
required: false
default: '## Release Note:'
jobs:
build:
runs-on: ubuntu-latest
steps:
# Step 1: Checkout the repository code
- name: Checkout code
uses: actions/checkout@v3
# Step 2: Pull Docker image from Docker Hub
- name: Set up Docker
uses: docker/setup-buildx-action@v2
- name: Pull Docker image
run: docker pull naderzare/ubuntu22-grpc-thrift:latest
- name: Print
run: |
pwd
ls
# Step 3: Run the build.sh script inside the Docker container
- name: Build project
run: |
docker run --rm -v ${{ github.workspace }}:/workspace naderzare/ubuntu-grpc-thrift:latest \
bash -c "ls && cd /workspace/utils && ls && chmod +x build.sh && ./build.sh && pwd && ldd ../build/bin/sample_player && cd /workspace/utils/app-image && chmod +x create_app_images.sh && ./create_app_images.sh"
# Step 4: List files in app-image directory (for debugging)
- name: List files in app-image directory
run: ls -l ${{ github.workspace }}/utils/app-image
# Step 5: Upload the tar.gz file as a release asset
- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
files: ${{ github.workspace }}/utils/app-image/soccer-simulation-proxy.tar.gz
tag_name: ${{ github.event.inputs.version }}
name: "Version ${{ github.event.inputs.version }}"
body: ${{ github.event.inputs.release_notes }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}