-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dependabot creates a PR for us so we have to introduce a new action which updates node-modules for us.
- Loading branch information
Showing
2 changed files
with
58 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "npm" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
groups: | ||
eslint: | ||
patterns: | ||
- "eslint*" | ||
esbuild: | ||
patterns: | ||
- "esbuild*" | ||
stylelint: | ||
patterns: | ||
- "stylelint*" | ||
patternfly: | ||
patterns: | ||
- "@patternfly*" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Dependabot update node-modules | ||
on: pull_request | ||
|
||
permissions: | ||
pull-requests: write | ||
|
||
jobs: | ||
dependabot: | ||
# 22.04's podman has issues with piping and causes tar errors | ||
runs-on: ubuntu-20.04 | ||
if: ${{ github.actor == 'dependabot[bot]' }} | ||
steps: | ||
- name: Clone repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Run npm-update bot | ||
run: | | ||
make tools/node-modules | ||
git config --global user.name "GitHub Workflow" | ||
git config --global user.email "[email protected]" | ||
mkdir -p ~/.config/cockpit-dev | ||
echo ${{ github.token }} >> ~/.config/cockpit-dev/github-token | ||
eval $(ssh-agent) | ||
ssh-add - <<< '${{ secrets.NODE_CACHE_DEPLOY_KEY }}' | ||
./tools/node-modules install | ||
./tools/node-modules push | ||
git add node_modules | ||
ssh-add -D | ||
ssh-agent -k | ||
- name: Force push the change to trigger testing workflows | ||
run: | | ||
sleep 1 # make sure the timestamp changes | ||
git commit --amend --no-edit | ||
eval $(ssh-agent) | ||
ssh-add - <<< '${{ secrets.COCKPIT_DEPLOY_KEY }}' | ||
git push --force '[email protected]:${{ github.repository }}' HEAD | ||
ssh-add -D | ||
ssh-agent -k |