Update layer versions #114
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Update layer versions | |
| # 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: v3 # temporary until v3 becomes the main branch | |
| - name: Set AWS credentials | |
| uses: aws-actions/configure-aws-credentials@v4 | |
| with: | |
| role-to-assume: arn:aws:iam::873528684822: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.3' | |
| 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@v7 | |
| with: | |
| commit-message: Update layer versions | |
| title: Update v3 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-v3 | |
| base: v3 # temporary until v3 becomes the main branch | |
| delete-branch: true # delete after merging or closing the PR |