GitHub's base VMs don't automatically refresh package indexes, so it can happen that one of the package dependencies get out of date and are not available on the mirrors any more. Run `apt update` first to ensure that the workflow installs the latest packages.
27 lines
726 B
YAML
27 lines
726 B
YAML
name: npm-update
|
|
on:
|
|
schedule:
|
|
- cron: '0 2 * * *'
|
|
# can be run manually on https://github.com/cockpit-project/starter-kit/actions
|
|
workflow_dispatch:
|
|
jobs:
|
|
npm-update:
|
|
runs-on: ubuntu-latest
|
|
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@v2
|
|
|
|
- name: Run npm-update bot
|
|
run: |
|
|
make bots
|
|
bots/npm-update
|