forked from cockpit-project/cockpit-machines
-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (32 loc) · 1.25 KB
/
po-refresh.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
name: po-refresh
on:
schedule:
# Run this on Tuesday evening (UTC), so that it's ready for release on
# Wednesday, with some spare time
- cron: '0 18 * * 2'
# can be run manually on https://github.com/cockpit-project/starter-kit/actions
workflow_dispatch:
jobs:
po-refresh:
runs-on: ubuntu-20.04
steps:
- name: Set up dependencies
run: |
sudo apt update
sudo apt install -y --no-install-recommends npm make gettext
- name: Set up configuration and secrets
run: |
printf '[user]\n\tname = Cockpit Project\n\temail=cockpituous@gmail.com\n' > ~/.gitconfig
echo '${{ secrets.COCKPITUOUS_TOKEN }}' > ~/.config/github-token
# po-refresh pushes to weblate repo via https://github.com, that needs our cockpituous token
git config --global credential.helper store
echo 'https://token:${{ secrets.COCKPITUOUS_TOKEN }}@github.com' >> ~/.git-credentials
- name: Clone repository
uses: actions/checkout@v2
with:
# the default GITHUB_TOKEN would override our ~/.git-credentials from above
token: '${{ secrets.COCKPITUOUS_TOKEN }}'
- name: Run po-refresh bot
run: |
make bots
bots/po-refresh