Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/event-processor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: 'Az CLI login'
uses: azure/login@v3
uses: azure/login@7ddb5af1ef8758cf1353cf3b42f940aee27ba21c # v3.0.2
if: ${{ github.event_name == 'issues' && github.event.action == 'opened' }}
with:
client-id: e4cb9fd5-0875-4ca1-bc43-56196f5dfb8f
Expand Down Expand Up @@ -107,7 +107,7 @@ jobs:
APP_CONFIG_ENDPOINT: ${{ env.APP_CONFIG_ENDPOINT }}

- name: Archive github event data
uses: actions/upload-artifact@v7
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
if: always()
with:
name: event
Expand Down
39 changes: 39 additions & 0 deletions .github/workflows/protected-files.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Prevent changes to files synced from azure-sdk-tools by authors without repo access.
# This workflow is synced to target repos via eng/pipelines/sync-.github.yml.
#
# The paths filter exactly enumerates the synced files, so if this workflow
# triggers at all, protected files were changed — no diff check needed.

name: Protected Files

on:
pull_request:
types:
- opened
- synchronize
- reopened
paths:
# Workflows synced from azure-sdk-tools
- '.github/workflows/*event*'
- '.github/workflows/post-apiview.yml'
- '.github/workflows/protected-files.yml'
# Skills synced from azure-sdk-tools
- '.github/skills/azsdk-common-*/**'

permissions:
contents: read

jobs:
protected-files:
name: Protected Files
runs-on: ubuntu-latest
if: >-
github.event.pull_request.author_association != 'OWNER'
&& github.event.pull_request.author_association != 'MEMBER'
&& github.event.pull_request.author_association != 'COLLABORATOR'

steps:
- name: "[reminder] Manually run sync pipeline!"
run: |
echo "::error::Protected files were modified by '${{ github.event.pull_request.user.login }}' (association: ${{ github.event.pull_request.author_association }}). Run the sync pipeline (https://dev.azure.com/azure-sdk/internal/_build?definitionId=6130) before merging this PR!"
exit 1
2 changes: 1 addition & 1 deletion .github/workflows/scheduled-event-processor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Archive github event data
uses: actions/upload-artifact@v7
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
if: always()
with:
name: event
Expand Down
Loading