The "Nullplatform Asset Push" GitHub Action automates the process of pushing built assets required by nullplatform. It supports various asset types, including Docker images and Lambda functions, and allows for customization of working directories, output locations, and AWS credentials (for pushing assets to ECR or S3 Buckets).
- Description: The ID of the build where the asset to be pushed belongs.
- Required: Yes
- Description: The type of asset to be pushed (e.g.,
docker-image
,lambda
, etc.). - Required: Yes
- Description: The directory where the build process took 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 are located.
- Required: No
- Default:
build
- Description: The name of the asset being pushed.
- Required: No
- Default:
main
- Description: Predefined asset URL. Advanced usage and not recommended.
- Required: No
- Description: The API key required for authentication if not logged in.
- Required: No
- Description: The ID of the pushed asset.
- Description: The name of the pushed asset.
- Description: The path to the pushed asset.
name: Push Docker Image
on:
push:
branches:
- main
jobs:
push-assets:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Push Docker Image
id: push-docker-image
uses: nullplatform/github-action-asset-push@v1
with:
build-id: 12345 # Replace with your build ID
type: docker-image
name: my-docker-image
##
## Other steps
##
In this example, the action pushes a Docker image with the name my-docker-image
.
name: Push Lambda Function
on:
push:
branches:
- main
jobs:
push-assets:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Push Lambda Function
id: push-lambda-function
uses: nullplatform/github-action-asset-push@v1
with:
build-id: 12345 # Replace with your build ID
type: lambda
name: my-lambda-function
##
## Other steps
##
In this example, the action pushes a Lambda function with the name my-lambda-function
.
name: Custom Directory
on:
push:
branches:
- main
jobs:
push-assets:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Push Assets with Custom Directory
id: push-assets-custom
uses: nullplatform/github-action-asset-push@v1
with:
build-id: 12345 # Replace with your build ID
type: docker-image
name: custom-docker-image
build-working-directory: path/to/build
##
## Other steps
##
In this example, the action pushes a Docker image from custom directory path/to/build
.
This action supports the following repositories out of the box:
To use this action with GitHub Packages, you must configure the following permissions in your workflow YAML:
permissions:
contents: read
packages: write
This action supports authentication for AWS repositories, including ECR (Elastic Container Registry) and S3 (Simple Storage Service). You can configure authentication using the following methods:
- Access Key and Access Secret: Provide your AWS access key and secret access key for authentication.
- Role to Assume: You can specify a role to assume with support for chaining.
The required parameters for authentication are automatically provided by our secrets and variables action.
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.