update-source-documentation #194
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ~~ Generated by projen. To modify, edit .projenrc.ts and run "npx projen". | |
name: update-source-documentation | |
on: | |
workflow_dispatch: {} | |
schedule: | |
- cron: 11 3 * * 1-5 | |
jobs: | |
update_source: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
id-token: write | |
pull-requests: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
lfs: true | |
- name: Set git identity | |
run: |- | |
git config user.name "github-actions" | |
git config user.email "[email protected]" | |
- name: Install dependencies | |
run: yarn install --check-files --frozen-lockfile | |
- name: Federate into AWS | |
uses: aws-actions/configure-aws-credentials@v2 | |
with: | |
aws-region: us-east-1 | |
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }} | |
role-session-name: awscdk-service-spec | |
role-duration-seconds: 900 | |
- name: update-source:documentation | |
run: npx projen update-source:documentation | |
- name: Create Pull Request | |
id: create-pr | |
uses: peter-evans/create-pull-request@v6 | |
with: | |
token: ${{ secrets.PROJEN_GITHUB_TOKEN }} | |
commit-message: |- | |
feat(sources): update documentation | |
> ⚠️ This Pull Request updates daily and will overwrite **all** manual changes pushed to the branch | |
Updates the documentation source from upstream. See details in [workflow run]. | |
[Workflow Run]: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} | |
------ | |
*Automatically created by projen via the "update-source-documentation" workflow* | |
branch: update-source/documentation | |
base: main | |
title: "feat(sources): update documentation" | |
labels: auto-approve | |
body: |- | |
> ⚠️ This Pull Request updates daily and will overwrite **all** manual changes pushed to the branch | |
Updates the documentation source from upstream. See details in [workflow run]. | |
[Workflow Run]: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} | |
------ | |
*Automatically created by projen via the "update-source-documentation" workflow* | |
author: github-actions <[email protected]> | |
committer: github-actions <[email protected]> | |
signoff: true | |
- name: add-instructions | |
if: ${{ steps.create-pr.outputs.pull-request-number }} | |
env: | |
GH_TOKEN: ${{ github.token }} | |
run: 'echo -e "**To work on this Pull Request, please create a new branch and PR. This prevents your work from being deleted by the automation.**\n\nRun the following commands inside the repo:\n\`\`\`console\ngh co ${{ steps.create-pr.outputs.pull-request-number }}\ngit switch -c fix-pr-${{ steps.create-pr.outputs.pull-request-number }} && git push -u origin HEAD\ngh pr create -t \"fix: PR #${{ steps.create-pr.outputs.pull-request-number }}\" --body \"Fixes ${{ steps.create-pr.outputs.pull-request-url }}\"\n\`\`\`"| gh pr comment ${{ steps.create-pr.outputs.pull-request-number }} -F-' |