Skip to content

minvws/action-generic-build-package

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Generic build package GitHub Action

This repository provides a reusable GitHub Action for creating a source build package for an application and uploading it as a CI artifact.

Usage

To use the action, add it to a workflow in your repository:

name: Build release package

on:
    push:
        tags:
            - v*

jobs:
    build-src-package:
        runs-on: ubuntu-latest
        steps:
            - name: Checkout repository
              uses: actions/checkout@v5

            - name: Create package
              uses: minvws/action-generic-build-package@v1
              with:
                  working_directory: "."
                  include_paths: "app static tools app.conf.example HOSTING_CHANGELOG.md"
                  package_file_name: "nl-irealisatie-project-name"

Replace working_directory, package_file_name and include_paths according to the requirements of the project. See Configuration for details.

In this basic example, the workflow is executed automatically on push of tags.

Configuration

The action has the following inputs:

  • package_file_name: Name of the package (without extension), for example: nl-example-package. Required.
  • include_paths: A space-separated list with files and directories to include in the package, relative to the working_directory. Optional, default: ".".
  • working_directory: The base directory containing the source code, relative to the project root. Optional, default: ".".
  • version_json_path: The location where version.json needs to be stored. For example public/version.json. Optional, default: version.json.
  • checkout_repository: Whether to checkout the repository in the action. Boolean string, for example "true". Optional, default: "false".

Result

This action will create a .tar.gz file containing the source files specified by include_paths relative to the base working directory specified by working_directory. The source package also contains an automatically generated version.json in the root of the package. The default location of the source package can be changed by using version_json_path input parameter of the github action.

The source package will be available as an artifact and will look like: <package_file_name>_<tag_version>.tar.gz. For example nl-example-package_v0.0.1.tar.gz. The uploaded artifact will have a limited lifetime depending on what is currently configured.

Contributing

If you want to contribute a new pipeline, please check the reusable workflow guidelines in the GitHub documentation.

License

This repository is released under the EUPL 1.2 license. See LICENSE for details.

Part of iCore

This package is part of the iCore project.

About

Repo action-generic-build-package for minvws

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

No packages published

Contributors 7

Languages