1
0
mirror of synced 2026-01-05 21:04:17 -05:00

Update content changes table workflow (#48658)

This commit is contained in:
Grace Park
2024-01-11 10:35:32 -08:00
committed by GitHub
parent 23e4b4e54d
commit f142d4424d
2 changed files with 4 additions and 29 deletions

View File

@@ -20,6 +20,9 @@ on:
description: 'Head SHA (latest sha of the PR)'
type: string
required: true
push:
paths:
- 'content/**'
# Required in lieu of `pull_request` so that the content changes tables can be posts to PRs opened from a fork.
pull_request_target:
@@ -33,35 +36,8 @@ concurrency:
cancel-in-progress: true
jobs:
PR-Preview-Links:
if: github.event.pull_request.user.login != 'docs-bot' && (github.repository == 'github/docs-internal' || github.repository == 'github/docs')
name: Add staging/live links to PR
runs-on: ubuntu-latest
outputs:
filterContentDir: ${{ steps.filter.outputs.filterContentDir }}
steps:
- name: Check out repo
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
- name: Get files changed
uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50
id: filter
with:
# Base branch used to get changed files
base: ${{ github.event.pull_request.base.ref }}
# Enables setting an output in the format in `${FILTER_NAME}_files
# with the names of the matching files formatted as JSON array
list-files: json
# Returns list of changed files matching each filter
filters: |
filterContentDir:
- 'content/**/*'
filterContentDir:
needs: PR-Preview-Links
if: ${{ needs.PR-Preview-Links.outputs.filterContentDir == 'true' && (github.repository == 'github/docs-internal' || github.repository == 'github/docs') }}
if: ${{ github.event.pull_request.user.login != 'docs-bot' && (github.repository == 'github/docs-internal' || github.repository == 'github/docs') }}
runs-on: ubuntu-latest
env:
PR_NUMBER: ${{ github.event.pull_request.number || inputs.PR_NUMBER }}