Bump actions/setup-python from 4.6.1 to 4.7.0 #103
Workflow file for this run
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
name: Dependabot PR | |
on: | |
pull_request: | |
types: [opened, reopened, synchronize] | |
jobs: | |
print-info: | |
name: Print PR info | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Print some event info | |
run: | | |
echo Ref: ${{ github.ref }} | |
echo Head-Ref: ${{ github.head_ref }} | |
echo Actor: ${{ github.actor }} | |
echo Event: ${{ github.event.pull_request }} | |
auto-approve-pr: | |
name: Auto approve dependabot PR | |
runs-on: ubuntu-22.04 | |
if: > | |
startsWith(github.head_ref, 'dependabot/npm_and_yarn') && | |
github.actor == 'dependabot[bot]' | |
needs: [print-info] | |
permissions: | |
pull-requests: write | |
steps: | |
- name: Check out code | |
uses: actions/[email protected] | |
with: | |
ref: ${{ github.head_ref }} | |
- name: Dependabot metadata | |
id: dependabot-metadata | |
uses: dependabot/[email protected] | |
with: | |
github-token: "${{ secrets.GITHUB_TOKEN }}" | |
- name: Approve a PR | |
if: ${{ steps.dependabot-metadata.outputs.update-type == 'version-update:semver-patch' }} | |
run: | | |
gh pr checkout "$PR_URL" | |
[ "$(gh pr status --json reviewDecision -q .currentBranch.reviewDecision)" != "APPROVED" ] \ | |
&& gh pr review --approve "$PR_URL" -b "LGTM :rocket:" | |
env: | |
PR_URL: ${{ github.event.pull_request.html_url }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
update-dist: | |
name: Update dist | |
runs-on: ubuntu-22.04 | |
if: > | |
startsWith(github.head_ref, 'dependabot/npm_and_yarn') && | |
github.actor == 'dependabot[bot]' | |
needs: [auto-approve-pr] | |
permissions: | |
contents: write | |
steps: | |
- name: Check out code | |
uses: actions/[email protected] | |
with: | |
ref: ${{ github.head_ref }} | |
- name: Setup Node | |
uses: actions/[email protected] | |
with: | |
node-version: '16' | |
- name: Setup yarn | |
run: npm install --location=global yarn | |
- name: Install dependencies | |
run: yarn install | |
- name: Update dist | |
run: yarn build | |
- name: Commit new dist | |
uses: stefanzweifel/[email protected] | |
with: | |
file_pattern: dist | |
commit_message: Build dist |