Skip to content

Slim Devcontainer #6

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 32 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
229 changes: 115 additions & 114 deletions .github/workflows/build-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,31 +26,31 @@ jobs:
tag: latest
args: |
BASE_IMAGE=jammy
- name: aws-localstack
context: devcontainer/aws/localstack
tag: 3.1.0-node16
args: |
NODE_MAJOR=16
LOCALSTACK_MAJOR=3
LOCALSTACK_MINOR=1
LOCALSTACK_PATCH=0
NPM_MAJOR=9
- name: aws-localstack
context: devcontainer/aws/localstack
tag: 3.1.0-node18
args: |
NODE_MAJOR=18
LOCALSTACK_MAJOR=3
LOCALSTACK_MINOR=1
LOCALSTACK_PATCH=0
- name: aws-localstack
context: devcontainer/aws/localstack
tag: 3.1.0-node20
args: |
NODE_MAJOR=20
LOCALSTACK_MAJOR=3
LOCALSTACK_MINOR=1
LOCALSTACK_PATCH=0
# - name: aws-localstack
# context: devcontainer/aws/localstack
# tag: 3.1.0-node16
# args: |
# NODE_MAJOR=16
# LOCALSTACK_MAJOR=3
# LOCALSTACK_MINOR=1
# LOCALSTACK_PATCH=0
# NPM_MAJOR=9
# - name: aws-localstack
# context: devcontainer/aws/localstack
# tag: 3.1.0-node18
# args: |
# NODE_MAJOR=18
# LOCALSTACK_MAJOR=3
# LOCALSTACK_MINOR=1
# LOCALSTACK_PATCH=0
# - name: aws-localstack
# context: devcontainer/aws/localstack
# tag: 3.1.0-node20
# args: |
# NODE_MAJOR=20
# LOCALSTACK_MAJOR=3
# LOCALSTACK_MINOR=1
# LOCALSTACK_PATCH=0
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down Expand Up @@ -90,108 +90,109 @@ jobs:
file: ${{ matrix.context }}/Dockerfile
context: ${{ matrix.context }}
build-args: ${{ matrix.args }}
platforms: linux/amd64,linux/arm64
# platforms: linux/amd64,linux/arm64
platforms: linux/amd64
pull: true
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha,scope=${{ runner.os }}-${{ matrix.name }}-${{ matrix.tag }}
cache-to: type=gha,scope=${{ runner.os }}-${{ matrix.name }}-${{ matrix.tag }},mode=max

runtime:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- name: awslambda-nextjs
context: awslambda/runtime/nextjs
tag: latest
args: |
BASE_IMAGE=nodejs
- name: awslambda-nextjs
context: awslambda/runtime/nextjs
tag: "14"
args: |
BASE_IMAGE=nodejs
NEXT_MAJOR=14
- name: awslambda-nextjs
context: awslambda/runtime/nextjs
tag: 14-node20
args: |
BASE_IMAGE=nodejs
NODE_MAJOR=20
NEXT_MAJOR=14
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
# runtime:
# runs-on: ubuntu-latest
# strategy:
# matrix:
# include:
# - name: awslambda-nextjs
# context: awslambda/runtime/nextjs
# tag: latest
# args: |
# BASE_IMAGE=nodejs
# - name: awslambda-nextjs
# context: awslambda/runtime/nextjs
# tag: "14"
# args: |
# BASE_IMAGE=nodejs
# NEXT_MAJOR=14
# - name: awslambda-nextjs
# context: awslambda/runtime/nextjs
# tag: 14-node20
# args: |
# BASE_IMAGE=nodejs
# NODE_MAJOR=20
# NEXT_MAJOR=14
# steps:
# - name: Checkout
# uses: actions/checkout@v3
# - name: Set up QEMU
# uses: docker/setup-qemu-action@v2
# - name: Set up Docker Buildx
# uses: docker/setup-buildx-action@v2

# Dockerhub
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
# # Dockerhub
# - name: Login to DockerHub
# uses: docker/login-action@v2
# with:
# username: ${{ secrets.DOCKERHUB_USERNAME }}
# password: ${{ secrets.DOCKERHUB_TOKEN }}

# GHCR
- name: Login to GHCR
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# # GHCR
# - name: Login to GHCR
# uses: docker/login-action@v2
# with:
# registry: ghcr.io
# username: ${{ github.actor }}
# password: ${{ secrets.GITHUB_TOKEN }}

# ECR
- name: Login to AWS
uses: saml-to/assume-aws-role-action@v1
with:
role: arn:aws:iam::557208059266:role/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# # ECR
# - name: Login to AWS
# uses: saml-to/assume-aws-role-action@v1
# with:
# role: arn:aws:iam::557208059266:role/[email protected]
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Get ECR Public Login
id: ecr-public-login
run: aws ecr-public get-login-password --region us-east-1
# - name: Get ECR Public Login
# id: ecr-public-login
# run: aws ecr-public get-login-password --region us-east-1

- name: Login to Public ECR
uses: docker/login-action@v2
with:
registry: public.ecr.aws
username: AWS
password: ${{ steps.ecr-public-login.outputs.stdout }}
# - name: Login to Public ECR
# uses: docker/login-action@v2
# with:
# registry: public.ecr.aws
# username: AWS
# password: ${{ steps.ecr-public-login.outputs.stdout }}

- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: |
${{ secrets.DOCKERHUB_USERNAME }}/${{ matrix.name }}
ghcr.io/${{ github.repository_owner }}/${{ matrix.name }}
public.ecr.aws/${{ github.repository_owner }}/${{ matrix.name }}
tags: |
type=raw,value=${{ matrix.tag }},enable=${{ github.ref == format('refs/heads/{0}', 'main') }}
type=raw,value=${{ matrix.tag }}-${{ github.sha }}
type=raw,value=${{ matrix.tag }}-{{date 'YYYYMMDD'}},enable=${{ github.ref == format('refs/heads/{0}', 'main') }}
type=schedule,pattern=${{ matrix.tag }}-{{date 'YYYYMMDD'}}
labels: |
maintainer=Scaffoldly <[email protected]>
- name: Build and push
id: build-push
uses: docker/build-push-action@v4
with:
file: ${{ matrix.context }}/Dockerfile
context: ${{ matrix.context }}
build-args: ${{ matrix.args }}
platforms: linux/amd64,linux/arm64
pull: true
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha,scope=${{ runner.os }}-${{ matrix.name }}-${{ matrix.tag }}
cache-to: type=gha,scope=${{ runner.os }}-${{ matrix.name }}-${{ matrix.tag }},mode=max
# - name: Docker meta
# id: meta
# uses: docker/metadata-action@v4
# with:
# images: |
# ${{ secrets.DOCKERHUB_USERNAME }}/${{ matrix.name }}
# ghcr.io/${{ github.repository_owner }}/${{ matrix.name }}
# public.ecr.aws/${{ github.repository_owner }}/${{ matrix.name }}
# tags: |
# type=raw,value=${{ matrix.tag }},enable=${{ github.ref == format('refs/heads/{0}', 'main') }}
# type=raw,value=${{ matrix.tag }}-${{ github.sha }}
# type=raw,value=${{ matrix.tag }}-{{date 'YYYYMMDD'}},enable=${{ github.ref == format('refs/heads/{0}', 'main') }}
# type=schedule,pattern=${{ matrix.tag }}-{{date 'YYYYMMDD'}}
# labels: |
# maintainer=Scaffoldly <[email protected]>
# - name: Build and push
# id: build-push
# uses: docker/build-push-action@v4
# with:
# file: ${{ matrix.context }}/Dockerfile
# context: ${{ matrix.context }}
# build-args: ${{ matrix.args }}
# platforms: linux/amd64,linux/arm64
# pull: true
# push: true
# tags: ${{ steps.meta.outputs.tags }}
# labels: ${{ steps.meta.outputs.labels }}
# cache-from: type=gha,scope=${{ runner.os }}-${{ matrix.name }}-${{ matrix.tag }}
# cache-to: type=gha,scope=${{ runner.os }}-${{ matrix.name }}-${{ matrix.tag }},mode=max

# awslambda-layer:
# needs: runtime
Expand Down
Loading
Loading