Skip to content

Update builder.toml and Send Pull Request #2283

Update builder.toml and Send Pull Request

Update builder.toml and Send Pull Request #2283

name: Update builder.toml and Send Pull Request
on:
schedule:
- cron: '36 0,12 * * *' # daily at 00:36 and 12:36 UTC
workflow_dispatch: {}
concurrency: builder_update
jobs:
update:
name: Update builder.toml
runs-on: ubuntu-22.04
steps:
- name: Check out
uses: actions/checkout@v3
- name: Checkout branch
uses: paketo-buildpacks/github-config/actions/pull-request/checkout-branch@main
with:
branch: "automation/builder-toml"
- name: Update builder.toml
uses: paketo-buildpacks/github-config/actions/builder/update@main
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Git commit
id: commit
uses: paketo-buildpacks/github-config/actions/pull-request/create-commit@main
with:
message: "Update builder.toml"
pathspec: "builder.toml"
keyid: ${{ secrets.PAKETO_BOT_GPG_SIGNING_KEY_ID }}
key: ${{ secrets.PAKETO_BOT_GPG_SIGNING_KEY }}
- name: Git push
if: ${{ steps.commit.outputs.commit_sha != '' }}
uses: paketo-buildpacks/github-config/actions/pull-request/push-branch@main
with:
branch: "automation/builder-toml"
- 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: "Updating builder.toml"
branch: "automation/builder-toml"
failure:
name: Alert on Failure
runs-on: ubuntu-22.04
needs: [update]
if: ${{ always() && needs.update.result == 'failure' }}
steps:
- name: File Failure Alert Issue
uses: paketo-buildpacks/github-config/actions/issue/file@main
with:
token: ${{ secrets.GITHUB_TOKEN }}
repo: ${{ github.repository }}
label: "failure:update-builder-toml"
comment_if_exists: true
issue_title: "Failure: Update Builder TOML workflow"
issue_body: |
Update Builder TOML workflow [failed](https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}).
comment_body: |
Another failure occurred: https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}