-
Notifications
You must be signed in to change notification settings - Fork 115
57 lines (49 loc) · 1.63 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
---
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 pack
id: latest-pack
uses: paketo-buildpacks/github-config/actions/tools/latest@main
with:
token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }}
repo: buildpacks/pack
- name: Update tools.json
env:
PACK_VERSION: ${{ steps.latest-pack.outputs.version }}
run: |
echo null | jq -r -S --arg pack "${PACK_VERSION}" \
'{ pack: $pack }' > ./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