Zephyr 3.5 Update #16
Workflow file for this run
This file contains 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: Clean up PR Compiler Service Container | |
on: | |
pull_request: | |
types: [closed] | |
branches: | |
- main | |
jobs: | |
build: | |
if: github.repository == 'moergo-sc/zmk' | |
runs-on: ubuntu-latest | |
# These permissions are needed to interact with GitHub's OIDC Token endpoint. | |
permissions: | |
id-token: write | |
contents: read | |
env: | |
ECR_REPOSITORY: zmk-builder-lambda | |
VERSIONS_BUCKET: glove80firmwarepipelines-compilerversionsbucket44-zubaquiyjdam | |
UPDATE_COMPILER_VERSIONS_FUNCTION: arn:aws:lambda:us-east-1:431227615537:function:Glove80FirmwarePipelineSt-UpdateCompilerVersions2A-CNxPOHb4VSuV | |
PR_NUMBER: ${{ github.event.number }} | |
steps: | |
- name: Extract image tag name | |
shell: bash | |
run: | | |
tag="pr${PR_NUMBER}.${GITHUB_HEAD_REF}" | |
# Replace / with . in container tag names | |
tag="${tag//\//.}" | |
echo "VERSION_NAME=${tag}" >> $GITHUB_ENV | |
id: extract_name | |
- name: Configure AWS credentials | |
uses: aws-actions/configure-aws-credentials@v1 | |
with: | |
role-to-assume: arn:aws:iam::431227615537:role/GithubCompilerLambdaBuilder | |
aws-region: us-east-1 | |
- name: Delete the image metadata file from the versions s3 bucket | |
run: aws s3 rm s3://$VERSIONS_BUCKET/images/$VERSION_NAME.json | |
- name: Notify the build pipeline that the compile containers have updated | |
run: >- | |
aws lambda invoke --function-name $UPDATE_COMPILER_VERSIONS_FUNCTION | |
--invocation-type Event | |
--cli-binary-format raw-in-base64-out | |
/dev/null |