Skip to content

npm-update-pf

npm-update-pf #7

Workflow file for this run

name: npm-update-pf
on:
schedule:
- cron: '0 2 * * 1'
# can be run manually on https://github.com/cockpit-project/cockpit-podman/actions
workflow_dispatch:
jobs:
npm-update:
environment: npm-update
permissions:
pull-requests: write
contents: write
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v3
- name: Run npm-update bot
run: |
make tools/make-bots tools/node-modules
tools/make-bots
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 }}'
bots/npm-update @patternfly >&2
ssh-add -D
ssh-agent -k
- name: Force push the change to trigger testing workflows
run: |
# Don't force-push if no branch was created
test "$(git symbolic-ref HEAD)" = '${{ github.ref }}' && exit
sleep 1 # make sure the timestamp changes
git commit --amend --no-edit
eval $(ssh-agent)
ssh-add - <<< '${{ secrets.SELF_DEPLOY_KEY }}'
git push --force '[email protected]:${{ github.repository }}' HEAD
ssh-add -D
ssh-agent -k