Skip to content

Commit

Permalink
added the github app access token step
Browse files Browse the repository at this point in the history
  • Loading branch information
sangeet-joy_xero committed Sep 19, 2024
1 parent 6d66ca0 commit 022a462
Showing 1 changed file with 23 additions and 15 deletions.
38 changes: 23 additions & 15 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,31 @@ jobs:
- name: Install yaml lint
run: pip install yamllint

- name: Run yamllint
run: |
git fetch > /dev/null 2>&1
git checkout ${{github.head_ref}}
find . -type f \( -name "*.yaml" \) > yaml_files.txt
# - name: Run yamllint
# run: |
# git fetch > /dev/null 2>&1
# git checkout ${{github.head_ref}}
# find . -type f \( -name "*.yaml" \) > yaml_files.txt

if [ -s yaml_files.txt ]; then
echo "linting the following yaml files:"
cat yaml_files.txt
xargs yamllint < yaml_files.txt
fi
# if [ -s yaml_files.txt ]; then
# echo "linting the following yaml files:"
# cat yaml_files.txt
# xargs yamllint < yaml_files.txt
# fi

# - name: Checkout codegen repo
# uses: actions/checkout@v4
# with:
# repository: xero-internal/xeroapi-sdk-codegen
# path: xeroapi-sdk-codegen
- name: Get github app access token
uses: actions/create-github-app-token@v1
id: get_access_token
with:
app-id: ${{ secrets.XERO_GITHUB_APP_ID }}
private-key: ${{ secrets.XERO_GITHUB_APPLICATION_KEY }}

- name: Checkout codegen repo
uses: actions/checkout@v4
with:
repository: xero-internal/xeroapi-sdk-codegen
path: xeroapi-sdk-codegen
token: ${{ steps.app-get_access_token.outputs.token }}

# - name: Install octokit dependencies
# run: npm i
Expand Down

0 comments on commit 022a462

Please sign in to comment.