-
Notifications
You must be signed in to change notification settings - Fork 66
50 lines (48 loc) · 1.69 KB
/
build_atlas_codeowners.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: Push CODEOWNERS to Platform Atlas
on:
workflow_call:
push:
branches:
- master
paths:
- '.github/CODEOWNERS'
permissions:
contents: read
checks: write
jobs:
copy-codeowners:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4.0.2
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: "us-gov-west-1"
- name: Checkout
uses: actions/checkout@v4
- name: Get bot token from Parameter Store
uses: department-of-veterans-affairs/action-inject-ssm-secrets@latest
with:
ssm_parameter: /devops/VA_VSP_BOT_GITHUB_TOKEN
env_variable_name: VA_VSP_BOT_GITHUB_TOKEN
- name: Check codeowner changes
id: check-codeowner-changes
uses: tj-actions/changed-files@v45 # v36.3.0
with:
files: |
.github/CODEOWNERS
- name: Pushes CODEOWNERS updates to Atlas
if: steps.check-codeowner-changes.outputs.any_changed == 'true'
uses: dmnemec/copy_file_to_another_repo_action@main
env:
API_TOKEN_GITHUB: ${{ env.VA_VSP_BOT_GITHUB_TOKEN }}
with:
source_file: '.github/CODEOWNERS'
destination_repo: 'department-of-veterans-affairs/platform-atlas'
destination_folder: '/lib/codeowners/vets-api'
destination_branch: 'master'
user_email: '70344339+va-vsp-bot@users.noreply.github.com'
user_name: 'va-vsp-bot'
commit_message: 'Auto update Atlas with Vets-API CODEOWNERS'