Skip to content

Automate GitHub Actions allow list for GitHub Enterprise Cloud accounts

License

Notifications You must be signed in to change notification settings

ActionsDesk/github-actions-allow-list-as-code-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date
Feb 3, 2025
Mar 22, 2024
Aug 5, 2024
May 27, 2021
May 27, 2021
Feb 15, 2024
Jun 8, 2021
May 27, 2021
Apr 3, 2023
Apr 3, 2023
Jun 22, 2023
Mar 22, 2024
May 27, 2021
Feb 17, 2025
Feb 1, 2025
Feb 15, 2024

Repository files navigation

github-actions-allow-list-as-code-action

Automate GitHub Actions allow list for GitHub Enterprise accounts

test CodeQL styled with prettier

Usage

name: Deploy GitHub Actions allow list

on:
  push:
    branches: [main]
    paths: [github-actions-allow-list.yml]

jobs:
  deploy:
    runs-on: ubuntu-latest

    permissions: read-all

    steps:
      - name: Checkout
        uses: actions/checkout@v2.3.4

      - name: Setup node
        uses: actions/setup-node@v2.1.5
        with:
          node-version: 14.x

      - name: Deploy GitHub Actions allow list
        uses: ActionsDesk/github-actions-allow-list-as-code-action@v1.1.2
        with:
          token: ${{ secrets.ENTERPRISE_ADMIN_TOKEN }}
          enterprise: 'your-enterprise'
          # same as defined under `on.pull_requests.paths`
          allow_list_path: github-actions-allow-list.yml
          # gh_api_url: 'https://github.example.com/api/v3' # Only required for GitHub Enterprise Server

Action Inputs

Name Description Default Required
token GitHub Personal Access Token (PAT) with admin:enterprise or admin:org scope true
organization GitHub organization slug false
enterprise GitHub Enterprise account slug false
allow_list_path Path to the GitHub Actions allow list YML within the repository github-actions-allow-list.yml false
gh_api_url GitHub Enterprise Servier - URL to the GitHub API endpoint.
Example: https://github.example.com/api/v3.
https://api.github.com false

ℹ️ Notes for providing enterprise or organization:

Allow List file

Example content for Allow List file containing actions: key and list with two allowed actions.

actions:
  - actionsdesk/github-actions-allow-list-as-code-action@v1.1.2
  - hashicorp/vault-action@v2.4.0

License