Skip to content

Commit

Permalink
fix penny deployment CI + disable caching for lambdas deployments
Browse files Browse the repository at this point in the history
  • Loading branch information
MahdiBM committed Dec 15, 2024
1 parent 1aa129c commit 8a84d0a
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/scripts/install-docker.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash

set -eu

# Docker installation steps, from their own website:

# Add Docker's official GPG key:
apt-get update -y
apt-get install ca-certificates curl gnupg -y
install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg
chmod a+r /etc/apt/keyrings/docker.gpg

# Add the repository to Apt sources:
# shellcheck source=/dev/null
echo \
"deb [arch=\"$(dpkg --print-architecture)\" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
\"$(. /etc/os-release && echo "$VERSION_CODENAME")\" stable" |
tee /etc/apt/sources.list.d/docker.list >/dev/null
apt-get update -y

# Install Docker:
apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin -y
2 changes: 2 additions & 0 deletions .github/workflows/deploy-all-lambdas.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ jobs:
git checkout ${{ github.sha }}
- name: Restore .build
if: false # ❌ Needs node 20 which amazonlinux2 doesn't have
id: "restore-cache"
uses: actions/cache/restore@v4
with:
Expand Down Expand Up @@ -71,6 +72,7 @@ jobs:
done
- name: Cache .build
if: false # ❌ Needs node 20 which amazonlinux2 doesn't have
uses: actions/cache/save@v4
with:
path: ${{ github.event.repository.name }}/.build
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/deploy-penny.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ jobs:

runs-on: ubuntu-latest

container: swift:6.0-jammy

steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -42,6 +44,14 @@ jobs:
path: .build
key: "penny-release-static-build-${{ runner.os }}-${{ github.event.after }}"

- name: Install Docker
run: |
# Make scripts executable
chmod +x ./.github/scripts/*
# Install Docker
./.github/scripts/install-docker.bash
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
Expand Down

0 comments on commit 8a84d0a

Please sign in to comment.