Skip to content

Update layer versions (Bref v2) #71

Update layer versions (Bref v2)

Update layer versions (Bref v2) #71

name: Update layer versions (Bref v2)
# Triggered manually or automatically when new Bref layers published
on:
workflow_dispatch:
inputs:
release_url:
type: string
release_html_url:
type: string
release_name:
type: string
# Necessary to connect to AWS using OIDC
# https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-amazon-web-services
permissions:
id-token: write # This is required for requesting the JWT token
# To allow creating GitHub commits
contents: write
pull-requests: write
jobs:
update-layer-versions:
name: Update layer versions
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
ref: master
- name: Set AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::534081306603:role/bref-github-actions
role-session-name: bref-github-actions
aws-region: us-east-1
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
tools: composer
- name: Install Composer dependencies
run: composer install --prefer-dist
- run: make layers.json
- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
commit-message: Update layer versions
title: Update Lambda layers [${{ inputs.release_name }}](${{ inputs.release_html_url }})
body: |
New AWS Lambda layers [have been released](https://github.com/brefphp/aws-lambda-layers/releases):
[${{ inputs.release_name }}](${{ inputs.release_html_url }})
This PR was automatically generated to update the layer versions used by Bref.
After merging, a new Bref release needs to be created.
If you are using AWS Lambda layer ARNs, check out [runtimes.bref.sh](https://runtimes.bref.sh/) to see the latest ARNs.
branch: new-layer-versions
delete-branch: true # delete after merging or closing the PR
# https://github.com/actions/checkout/issues/13#issuecomment-724415212
committer: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>