The "Nullplatform Asset Build" GitHub Action automates the building of supported asset types on nullplatform. It simplifies the process of creating assets by executing custom build commands and provides flexibility in specifying working directories and output locations.
- Description: The command to be executed for building the assets.
- Required: No
- Default:
make
- Description: Additional arguments to be passed along with the build command.
- Required: No
- Default:
build
- Description: Additional options or flags to be used during the build process.
- Required: No
- Default:
''
- Description: Checks-out your repository under
$GITHUB_WORKSPACE
, so your workflow can access it. - Required: No
- Default:
true
- Description: The directory where the build process will take place.
- Required: No
- Default:
.
(current directory)
- Description: The directory containing source code and assets for the build process.
- Required: No
- Default:
.
(current directory)
- Description: The directory where built assets will be output.
- Required: No
- Default:
build
- Description: The name of the asset or project being built.
- Required: No
- Default:
main
- Description: The type of asset to be built, e.g.,
docker-image
,lambda
, etc. - Required: No
- Default:
''
- Description: The ID of the built asset.
- Description: The name of the asset built.
- Description: The path to the built asset.
name: Default Build
on:
push:
branches:
- main
jobs:
build-assets:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Build Asset
id: build-asset
uses: nullplatform/github-action-asset-build@v1
##
## Other steps
##
In this example, the action will perform a default build using the make
command in the current directory.
name: Custom Directories
on:
push:
branches:
- main
jobs:
build-assets:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Build Asset
id: build-asset
uses: nullplatform/github-action-asset-build@v1
with:
asset-working-directory: path/to/my-application
asset-output-directory: output
name: application-asset
##
## Other steps
##
In this example, the action will build assets from the path/to/my-application
directory and output the results to the output
directory with the name application-asset
.
name: Subdirectory Build
on:
push:
branches:
- main
jobs:
build-assets:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Build Asset
id: build-asset
uses: nullplatform/github-action-asset-build@v1
with:
build-working-directory: path/to/subdirectory
##
## Other steps
##
In this example, the action will navigate to the path/to/subdirectory
for the build process.
name: Custom Build Command
on:
push:
branches:
- main
jobs:
build-assets:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Build Asset
id: build-asset
uses: nullplatform/github-action-asset-build@v1
with:
command: npm
arguments: run build
options: --prod
name: custom-asset
##
## Other steps
##
In this example, the action will execute a custom build command using npm
with the arguments run build
and additional options --prod
.
Please note that this action does not install any dependencies or commands. It is the user's responsibility to ensure that the required build command and dependencies are available in the execution environment.
This GitHub Action is licensed under the MIT License.