Skip to content

Commit

Permalink
Merge branch 'main' into codeql-workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
James M. Greene authored and GitHub committed Mar 22, 2023
2 parents ea6c51c + 7110e9e commit f207b2f
Show file tree
Hide file tree
Showing 11 changed files with 15,593 additions and 15,159 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/rebuild-dependabot-prs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Rebuild distributables for Dependabot PRs

on:
push:
branches:
- 'dependabot/npm**'

permissions:
contents: write

# This allows a subsequently queued workflow run to interrupt previous runs
concurrency:
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
cancel-in-progress: true

jobs:
rebuild-dist:
if: ${{ github.event.sender.login == 'dependabot[bot]' }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
token: ${{ secrets.PAGES_AUTOMATION_PAT }}

- name: Setup Node.JS
uses: actions/setup-node@v3
with:
node-version: 16.x
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Rebuild the dist/ directory
run: npm run prepare

- name: Commit any differences present in the dist/ directory
run: |
if [ "$(git diff --ignore-space-at-eol dist/ | wc -l)" -gt "0" ]; then
echo "Detected uncommitted changes after rebuild in dist folder. Committing..."
git add dist/
git config --local user.name "github-actions[bot]"
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git commit -m "Update distributables after Dependabot 🤖"
echo "Pushing branch ${{ github.ref_name }}"
git push origin ${{ github.ref_name }}
fi
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ inputs:
default: ${{ github.token }}
required: true
enablement:
description: 'Should a Pages site be enabled for the repository if not so already? This will only work with user-to-server tokens.'
description: 'Try to enable Pages for the repository if it is not already enabled. This option requires a token other than `GITHUB_TOKEN` to be provided. In the context of a Personal Access Token, the `repo` scope or Pages write permission is required. In the context of a GitHub App, the `administration:write` and `pages:write` permissions are required.'
default: 'false'
required: false
outputs:
Expand Down
Loading

0 comments on commit f207b2f

Please sign in to comment.