Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make dependabot update dist automatically #172

Merged
merged 2 commits into from
Feb 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions .github/workflows/update-dist-on-dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Update action dist on dependabot PRs
on:
push:
branches:
- dependabot/npm_and_yarn/**
pull_request:
branches:
- dependabot/npm_and_yarn/**


jobs:
update-action-dist:
runs-on: ubuntu-latest
steps:
- name: Generate token
id: generate_token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.ACTIONS_APP_ID }}
private-key: ${{ secrets.ACTIONS_APP_PEM }}

- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
token: ${{ steps.generate_token.outputs.token }}

- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: 'npm'
cache-dependency-path: package-lock.json

- name: Update action dist
run: npm ci && npm run prepare

- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Update action dist
branch: ${{ github.head_ref }}
commit_user_name: ${{ github.actor }}
commit_user_email: ${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ inputs:
forceBuildFromSource:
description: 'whether to force building from source instead of using installer package'
required: false
default: false
default: 'false'
gstreamerOptions:
description: 'The option configuration string for buliding GStreamer from source'
required: false
Expand Down