-
Notifications
You must be signed in to change notification settings - Fork 18
56 lines (43 loc) · 1.46 KB
/
push-idn-specs-to-dev-portal.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
51
52
53
54
55
56
name: "Push IDN API Specs to Developer Portal"
on:
push:
branches:
- main
paths:
- idn/**
jobs:
push_spec_workflow:
name: Push API spec changes
runs-on: ubuntu-latest
steps:
# Checkout the master branch request to run rsync
- name: Checkout PR branch
uses: actions/checkout@v2
with:
ref: ${{ github.ref }}
# Checkout the main branch of api-specs
- name: Checkout API Specs Repo
uses: actions/checkout@v2
with:
repository: sailpoint-oss/developer.sailpoint.com
path: developer-community
ref: main
- name: Install rsync
run: |
sudo apt install rsync grsync
- name: Sync files between folders
run: |
CURRENT_SPEC_PATH="idn/"
NEW_API_SPEC_PATH="developer-community/static/api-specs/idn/"
rsync -cav --delete $CURRENT_SPEC_PATH $NEW_API_SPEC_PATH
cd developer-community
git status
git config --unset-all http.https://github.com/.extraheader
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action Bot"
git add .
git commit -m "Automated commit by github action: ${{ github.run_id }}"
git status
git remote set-url origin https://${{secrets.API_SPEC_PAT}}@github.com/sailpoint-oss/developer.sailpoint.com.git
git remote -v
git push