credfeto/action-repo-visibility
Basename is uppercase README.mdComposite action step script body
SHA-2566c2e7b555ad4c40f1462ef2973ded29387d8100ed503696de6f08273650e0c1d
Evidence
1# action-repo-visibility
2
3Checks the github repository's visibility to see if it is public or private so that the workflow can be customised
4and enable tasks that should only occur on public or private repos.
5
6## How to use it?
7This is a Github action, so it has to be added to a github workflow.
8
9A simple example of running this action on all pushes to the repository would be
10add a `visibility.yml` file under `.github/workflows` with the following content.
11
12```yamlstatus
13name: Test Workflow
14
15on:
16 [push]
17
18jobs:
⋯13 lines
32 - if: ${{ steps.visibility.outputs.is_public == 'true' }}
33 run: echo "Repo is Public"
34 # Run additional tasks that are required for public repos
35 # e.g. alerting that the repo is public when it should not be
36
⋯12 lines
No evidence locations were recorded for this file. Raw result