Skip to content
activity

GitHub Action

GitRoll Scan Action

v0.1.0 Latest version

GitRoll Scan Action

activity

GitRoll Scan Action

A GitHub Action that requests a GitRoll scan on a specified GitHub user's profile

Installation

Copy and paste the following snippet into your .yml file.

              

- name: GitRoll Scan Action

uses: CIFriends/gitroll-action@v0.1.0

Learn more about this action in CIFriends/gitroll-action

Choose a version

GitRoll Scanning Action

Important

The action mode wait still in development.

This repository contains a GitHub Action that requests a GitRoll scan for a given GitHub user.

Action Details

The main entry point for the action is src/index.ts, which imports and runs the run function from src/main.ts. This function retrieves an input named "username" and "wait" from the action's inputs, and then calls the requestScan function from src/gitroll.ts with the given username. The requestScan function sends a POST request to the GitRoll API to request a scan for the given username. The function returns a promise that resolves when the scan is complete.

Development

The code is written in TypeScript and transpiled to JavaScript for distribution. The tsconfig.json file contains the TypeScript compiler options. The package.json file contains various scripts for formatting, linting, testing, and building the code. The preinstall script ensures that pnpm is used as the package manager.

Usage

Using in your readme

To use this action in your repository, you can create a workflow file in the .github/workflows directory. For example, you can create a file named scan.yml with the following content:

name: Scan

on:
  schedule:
    - cron: "30 0 * * *"
  workflow_dispatch:
  push:

jobs:
  scan:
    runs-on: ubuntu-latest
    steps:
      - name: browser install
        run: npx puppeteer browsers install chrome
      - name: GitRoll Scan
        uses: brenoepics/gitroll-action@v0.1.0

This workflow will run every day at midnight and request a scan for the repository owner username, you can also specify the username with the username input.

      - name: GitRoll Scan
        uses: brenoepics/gitroll-action@v0.1.0
        with:
          username: 'brenoepics'

License

This project is licensed under MIT License. See the LICENSE file for details.