starter-kit/.github/workflows/npm-update.yml
Martin Pitt b60dd6f945 workflows: Explicitly set minimal token permissions
This will allow us to set the default token permissions to restricted,
and thus avoid accidentally introducing over-privileged new workflows.
2023-04-20 11:05:15 +02:00

30 lines
809 B
YAML

name: npm-update
on:
schedule:
- cron: '0 2 * * 2,4,6'
# can be run manually on https://github.com/cockpit-project/starter-kit/actions
workflow_dispatch:
jobs:
npm-update:
runs-on: ubuntu-latest
permissions:
pull-requests: write
contents: write
steps:
- name: Set up dependencies
run: |
sudo apt update
sudo apt install -y npm make
- name: Set up configuration and secrets
run: |
printf '[user]\n\tname = Cockpit Project\n\temail=cockpituous@gmail.com\n' > ~/.gitconfig
echo '${{ secrets.GITHUB_TOKEN }}' > ~/.config/github-token
- name: Clone repository
uses: actions/checkout@v3
- name: Run npm-update bot
run: |
make bots
bots/npm-update ~@patternfly