Skip to content

Update Tools

Update Tools #771

Workflow file for this run

---
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