blob: 01543bfa17ee987d914d815e5281b6a7bc68dc1d [file]
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: 'validate-actions'
description: 'Validates that every action used by the GitHub workflow files is on the ASF Infra approved list'
inputs:
workflows-dir:
description: 'Directory containing the workflow files to validate, relative to the repository root'
required: false
default: '.github/workflows'
approved-patterns-url:
description: 'URL of the approved_patterns.yml allowlist. Defaults to the ASF infrastructure-actions copy'
required: false
default: 'https://raw.githubusercontent.com/apache/infrastructure-actions/main/approved_patterns.yml'
actions-url:
description: 'URL of the actions.yml SHA-to-tag mapping. Defaults to the ASF infrastructure-actions copy'
required: false
default: 'https://raw.githubusercontent.com/apache/infrastructure-actions/main/actions.yml'
runs:
using: 'docker'
image: 'Dockerfile'
env:
WORKFLOWS_DIR: ${{ inputs.workflows-dir }}
APPROVED_PATTERNS_URL: ${{ inputs.approved-patterns-url }}
ACTIONS_URL: ${{ inputs.actions-url }}