forked from cockpit-project/cockpit-podman
-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (40 loc) · 1.4 KB
/
npm-update-pf.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
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