Skip to content

iits-consulting/action-get-project-metadata

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Action get metadata from any repository

This GitHub Action grabs project metadata Data provided as JSON object

Example Workflow

name: Search in project

on: push

jobs:
  pull-request:
    runs-on: ubuntu-latest
    steps:
    - name: Checkout
      uses: actions/checkout@v2

    - name: Get labels from project
      uses: iits-consulting/action-get-project-metadata@main
      env:
        API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
      with:
        destination_repo: 'user-name/repository-name'
        type: 'labels'

    - name: Search for chartName label
      run: |
        CHART_NAME=$(echo ${{ steps.labels.outputs }} | jq -r -c 'map(select(.name | contains("chartName")) | .name)')
        if [[ -z $CHART_NAME ]]; then
          echo "ERROR: There is no label 'chartName'"
          exit 1
        fi

Variables

  • destination_repo: The repository to place the file or directory in.
  • labels: summary/labels/pull-requests

ENV

  • API_TOKEN_GITHUB: You must create a personal access token in you account. Follow the link:

You must select the scopes: 'repo = Full control of private repositories', 'admin:org = read:org' and 'write:discussion = Read:discussion';

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published