1
0
mirror of synced 2026-01-05 12:07:35 -05:00

add sha of sync pipeline data to config file (#35335)

Co-authored-by: Peter Bengtsson <peterbe@github.com>
This commit is contained in:
Rachael Sewell
2023-03-08 09:50:23 -08:00
committed by GitHub
parent e38a295f49
commit 7232daa5e1
9 changed files with 81 additions and 48 deletions

View File

@@ -27,7 +27,7 @@ concurrency:
jobs:
generate-decorated-files:
if: github.repository == 'github/docs-internal'
runs-on: ubuntu-latest
runs-on: ubuntu-20.04-xl
steps:
- if: ${{ env.FREEZE == 'true' }}
run: |
@@ -49,14 +49,6 @@ jobs:
- uses: ./.github/actions/node-npm-setup
- name: Get the rest-api-description SHA being synced
id: rest-api-description
run: |
cd rest-api-description
OPENAPI_COMMIT_SHA=$(git rev-parse HEAD)
echo "OPENAPI_COMMIT_SHA=$OPENAPI_COMMIT_SHA" >> $GITHUB_OUTPUT
echo "Copied files from github/rest-api-description repo. Commit SHA: $OPENAPI_COMMIT_SHA"
- name: Sync the REST, Webhooks, and GitHub Apps schemas
run: |
src/rest/scripts/update-files.js --source-repo rest-api-description --output rest github-apps webhooks rest-redirects
@@ -64,6 +56,17 @@ jobs:
echo "Deleting the cloned github/rest-api-description repo..."
rm -rf rest-api-description
- name: Get the rest-api-description SHA being synced
id: rest-api-description
run: |
OPENAPI_COMMIT_SHA=$(cat src/rest/lib/config.json | jq -r '.sha')
echo "OPENAPI_COMMIT_SHA=$OPENAPI_COMMIT_SHA" >> $GITHUB_OUTPUT
echo "Copied files from github/rest-api-description repo. Commit SHA: $OPENAPI_COMMIT_SHA"
if [ -z $OPENAPI_COMMIT_SHA ]; then
echo "OpenAPI commit SHA is empty!"
exit 1
fi
- name: Create pull request
env:
# Needed for gh