Merge https://github.com/cisagov/skeleton-generic into lineage/skeleton #33
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: sync-labels | |
on: # yamllint disable-line rule:truthy | |
push: | |
paths: | |
- .github/labels.yml | |
- .github/workflows/sync-labels.yml | |
workflow_dispatch: | |
permissions: | |
contents: read | |
jobs: | |
diagnostics: | |
name: Run diagnostics | |
# This job does not need any permissions | |
permissions: {} | |
runs-on: ubuntu-latest | |
steps: | |
# Note that a duplicate of this step must be added at the top of | |
# each job. | |
- name: Apply standard cisagov job preamble | |
uses: cisagov/action-job-preamble@v1 | |
with: | |
check_github_status: "true" | |
# This functionality is poorly implemented and has been | |
# causing problems due to the MITM implementation hogging or | |
# leaking memory. As a result we disable it by default. If | |
# you want to temporarily enable it, simply set | |
# monitor_permissions equal to "true". | |
# | |
# TODO: Re-enable this functionality when practical. See | |
# cisagov/skeleton-generic#207 for more details. | |
monitor_permissions: "false" | |
output_workflow_context: "true" | |
# Use a variable to specify the permissions monitoring | |
# configuration. By default this will yield the | |
# configuration stored in the cisagov organization-level | |
# variable, but if you want to use a different configuration | |
# then simply: | |
# 1. Create a repository-level variable with the name | |
# ACTIONS_PERMISSIONS_CONFIG. | |
# 2. Set this new variable's value to the configuration you | |
# want to use for this repository. | |
# | |
# Note in particular that changing the permissions | |
# monitoring configuration *does not* require you to modify | |
# this workflow. | |
permissions_monitoring_config: ${{ vars.ACTIONS_PERMISSIONS_CONFIG }} | |
labeler: | |
needs: | |
- diagnostics | |
permissions: | |
# actions/checkout needs this to fetch code | |
contents: read | |
# crazy-max/ghaction-github-labeler needs this to manage repository labels | |
issues: write | |
runs-on: ubuntu-latest | |
steps: | |
- name: Apply standard cisagov job preamble | |
uses: cisagov/action-job-preamble@v1 | |
with: | |
# This functionality is poorly implemented and has been | |
# causing problems due to the MITM implementation hogging or | |
# leaking memory. As a result we disable it by default. If | |
# you want to temporarily enable it, simply set | |
# monitor_permissions equal to "true". | |
# | |
# TODO: Re-enable this functionality when practical. See | |
# cisagov/skeleton-generic#207 for more details. | |
monitor_permissions: "false" | |
# Use a variable to specify the permissions monitoring | |
# configuration. By default this will yield the | |
# configuration stored in the cisagov organization-level | |
# variable, but if you want to use a different configuration | |
# then simply: | |
# 1. Create a repository-level variable with the name | |
# ACTIONS_PERMISSIONS_CONFIG. | |
# 2. Set this new variable's value to the configuration you | |
# want to use for this repository. | |
# | |
# Note in particular that changing the permissions | |
# monitoring configuration *does not* require you to modify | |
# this workflow. | |
permissions_monitoring_config: ${{ vars.ACTIONS_PERMISSIONS_CONFIG }} | |
- uses: actions/checkout@v4 | |
- name: Sync repository labels | |
if: success() | |
uses: crazy-max/ghaction-github-labeler@v5 | |
with: | |
# This is a hideous ternary equivalent so we only do a dry run unless | |
# this workflow is triggered by the develop branch. | |
dry-run: ${{ github.ref_name == 'develop' && 'false' || 'true' }} |