-
Notifications
You must be signed in to change notification settings - Fork 49
66 lines (57 loc) · 1.99 KB
/
update-tools.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
---
name: Update Tools
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch: {}
jobs:
update:
name: Update
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Checkout Branch
uses: paketo-buildpacks/github-config/actions/pull-request/checkout-branch@main
with:
branch: automation/tools/update
- name: Fetch Latest Hugo
id: latest-hugo
uses: paketo-buildpacks/github-config/actions/tools/latest@main
with:
token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }}
repo: gohugoio/hugo
- name: Fetch Latest Muffet
id: latest-muffet
uses: paketo-buildpacks/github-config/actions/tools/latest@main
with:
token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }}
repo: raviqqe/muffet
- name: Update tools.json
env:
HUGO_VERSION: ${{ steps.latest-hugo.outputs.version }}
MUFFET_VERSION: ${{ steps.latest-muffet.outputs.version }}
run: |
echo null | jq -r -S --arg hugo "${HUGO_VERSION}" \
--arg muffet "${MUFFET_VERSION}" \
'{ hugo: $hugo, muffet: $muffet }' > ./scripts/.util/tools.json
- name: Commit
id: commit
uses: paketo-buildpacks/github-config/actions/pull-request/create-commit@main
with:
message: "Updating tools"
pathspec: "."
keyid: ${{ secrets.PAKETO_BOT_GPG_SIGNING_KEY_ID }}
key: ${{ secrets.PAKETO_BOT_GPG_SIGNING_KEY }}
- name: Push Branch
if: ${{ steps.commit.outputs.commit_sha != '' }}
uses: paketo-buildpacks/github-config/actions/pull-request/push-branch@main
with:
branch: automation/tools/update
- name: Open Pull Request
if: ${{ steps.commit.outputs.commit_sha != '' }}
uses: paketo-buildpacks/github-config/actions/pull-request/open@main
with:
token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }}
title: "Updates tools"
branch: automation/tools/update