feat: add concurrency control to workflows #2
Workflow file for this run
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: Build Installers | |
| on: | |
| push: | |
| branches: [ main, develop ] | |
| paths: | |
| - 'Dockerfile' | |
| - '.github/workflows/build-installers.yml' | |
| pull_request: | |
| branches: [ main ] | |
| paths: | |
| - 'Dockerfile' | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build-installers: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Login to GitHub Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build and push installers | |
| run: | | |
| # Build awscurl-installer | |
| docker buildx build \ | |
| --platform linux/arm64 \ | |
| --provenance=false \ | |
| --target awscurl-installer \ | |
| --tag ghcr.io/${{ github.repository_owner }}/lambda-shell-runtime:awscurl-installer \ | |
| --push \ | |
| -f - . << 'EOF' | |
| FROM public.ecr.aws/lambda/provided:al2023 AS awscurl-installer | |
| RUN dnf install -y unzip python3-pip findutils && dnf clean all | |
| RUN pip3 install --no-cache-dir --target /tmp/awscurl awscurl && \ | |
| find /tmp/awscurl -type d -name '__pycache__' -exec rm -rf {} + && \ | |
| find /tmp/awscurl -type f -name '*.pyc' -delete && \ | |
| find /tmp/awscurl -type d -name '*.dist-info' -exec rm -rf {} + | |
| EOF | |
| # Build awscli-installer | |
| docker buildx build \ | |
| --platform linux/arm64 \ | |
| --provenance=false \ | |
| --target awscli-installer \ | |
| --tag ghcr.io/${{ github.repository_owner }}/lambda-shell-runtime:awscli-installer \ | |
| --push \ | |
| -f - . << 'EOF' | |
| FROM public.ecr.aws/lambda/provided:al2023 AS awscli-installer | |
| RUN dnf install -y aws-cli && dnf clean all | |
| EOF |