Skip to content

Commit

Permalink
chore: apply template-oss
Browse files Browse the repository at this point in the history
  • Loading branch information
lukekarrys committed Apr 5, 2022
1 parent 4b3db43 commit adaf3ba
Showing 1 changed file with 17 additions and 16 deletions.
33 changes: 17 additions & 16 deletions .github/workflows/post-dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,15 @@ on: pull_request

# https://docs.github.com/en/rest/overview/permissions-required-for-github-apps
permissions:
actions: write
contents: write

jobs:
Install:
runs-on: ubuntu-latest
if: startsWith(github.head_ref, 'dependabot/npm_and_yarn/npmcli/template-oss-')
if: github.actor == 'dependabot[bot]'
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Setup git user
run: |
git config --global user.email "ops+npm-cli@npmjs.com"
Expand All @@ -26,18 +25,20 @@ jobs:
- name: Update npm to latest
run: npm i --prefer-online --no-fund --no-audit -g npm@latest
- run: npm -v
- name: Apply template-oss changes
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v1.1.1
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
- name: npm install and commit
if: contains(steps.metadata.outputs.dependency-names, '@npmcli/template-oss')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
npm install --ignore-scripts --no-audit --no-fund
gh pr checkout ${{ github.event.pull_request.number }}
npm install --ignore-scripts
npm run template-oss-apply
git status
- uses: gr2m/create-or-update-pull-request-action@v1
env:
GITHUB_TOKEN: ${{ secrets.TEST_DEPENDABOT_TOKEN }}
with:
commit-message: "chore: postinstall for dependabot template-oss PR"
path: "."
branch: ${{ github.event.pull_request.head.ref }}
- name: Lint
run: npm run lint

git add .
git commit -am "chore: postinstall for dependabot template-oss PR"
git push
npm run lint

0 comments on commit adaf3ba

Please sign in to comment.