-
Notifications
You must be signed in to change notification settings - Fork 46
41 lines (39 loc) · 1.36 KB
/
actions.yaml
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: Update Tools
on:
schedule:
- cron: 0 0 * * *
jobs:
update-tools:
if: ${{ github.repository_owner == 'GothenburgBitFactory' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Update tools
env:
GITHUB_API_KEY: ${{ secrets.GITHUB_TOKEN }}
LOG_LEVEL: "INFO"
run: |
python3 -m venv /tmp/venv
/tmp/venv/bin/pip install --upgrade pip
/tmp/venv/bin/pip install -r bin/requirements.txt
/tmp/venv/bin/python bin/update.py static/tools-data.json
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v7
with:
delete-branch: true
commit-message: Updated tools-data.json
author: "Taskwarrior Bot <[email protected]>"
title: Updated tools-data.json
body: |
- Updated `tools-data.json`
Auto-generated by [create-pull-request][1]
[1]: https://github.com/peter-evans/create-pull-request
branch: update-tools
- name: Merge Pull Request
if: "${{ steps.cpr.outputs.pull-request-number != '' }}"
uses: juliangruber/merge-pull-request-action@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
number: ${{ steps.cpr.outputs.pull-request-number }}
method: merge