Sunday, May 19, 2024
HomeGolangCross-platform GitHub motion to add a number of property to a launch...

Cross-platform GitHub motion to add a number of property to a launch utilizing Golang.


Options

  • Property is usually a international regex
  • Overwrite property if wished
  • Reverse (delete all uploaded property) in case of failure if wished
  • Output with colours and emojis

Necessities

This motion might fail if there are not any write permissions on contents.

permissions:
  contents: write

Arguments

All default values are handed if the motion is used on a launch occasion workflow, in any other case they lacking ones have to be offered for the reason that occasion related won’t have all the required values.

Identify Required Default worth Description
recordsdata all the time Paths of the property to be uploaded, it may be glob regex. It have to be a string array. For instance: recordsdata: '["my_asset", "*.py", "dist/*"]'
token no github.token GitHub Acess Token. Picked mechanically from github context.
tag sure github.occasion.launch.tag_name Tag related to the discharge the place to add the property. Picked mechanically from github context if the occasion that triggered the workflow is launch, if not, it have to be offered.
proprietor no github.repository_owner Proprietor of Respository. Picked mechanically from github context.
repo no github.repository Repository the place to add property. Picked mechanically from github context.
workspace no github.workspace Workspace the place to look the property. Picked utomatically from github context.
overwrite_assets no true Overwrite property in the event that they’re already within the launch.
revert_on_failure no true Revert (delete all already uploaded property) in case of failure.

Instance

identify: Check Add Property To Launch on Launch Occasion

on:
  launch:
    varieties: [published]

jobs:
  test-upload-assets:
    runs-on: ubuntu-latest
    permissions:
      contents: write
    steps:
      - makes use of: actions/[email protected]
      - identify: Add property to launch
        makes use of: ahsand97/[email protected]
        with:
          recordsdata: '["my_asset"]'
RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments