Skip to content

Commit

Permalink
ci: add codespace image
Browse files Browse the repository at this point in the history
  • Loading branch information
shyim committed Apr 14, 2024
1 parent 4b98ad6 commit f4040d3
Show file tree
Hide file tree
Showing 2 changed files with 87 additions and 0 deletions.
55 changes: 55 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
FROM cgr.dev/chainguard/wolfi-base

RUN <<EOF
set -eo pipefail

apk add --no-cache \
libstdc++ \
sudo-rs \
nodejs-21 \
curl \
npm \
go \
golangci-lint \
openssh \
openssh-keygen \
openssh-client \
git \
git-lfs \
composer \
php-8.2 \
php-8.2-fileinfo \
php-8.2-openssl \
php-8.2-ftp \
php-8.2-ctype \
php-8.2-xml \
php-8.2-dom \
php-8.2-simplexml \
php-8.2-xmlreader \
php-8.2-xmlwriter \
php-8.2-bcmath \
php-8.2-iconv \
php-8.2-gd \
php-8.2-intl \
php-8.2-pdo \
php-8.2-pdo_mysql \
php-8.2-mysqlnd \
php-8.2-pcntl \
php-8.2-sockets \
php-8.2-bz2 \
php-8.2-gmp \
php-8.2-soap \
php-8.2-zip \
php-8.2-redis \
php-8.2-opcache \
php-8.2-amqp

# Refresh ldconfig cache
ldconfig
echo '%gitpod ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers
addgroup -g 33333 gitpod
adduser -u 33333 -G gitpod -h /home/gitpod -s /bin/bash -D gitpod
EOF

USER gitpod

32 changes: 32 additions & 0 deletions .github/workflows/codespace.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Codespaces

on:
push:
branches:
- main
paths:
- .devcontainer/Dockerfile

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Login into Github Docker Registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Build and push
uses: docker/build-push-action@v5
with:
context: .devcontainer
push: true
platforms: linux/amd64,linux/arm64
tags: "ghcr.io/friendsofshopware/shopware-cli-codespace"
provenance: false

0 comments on commit f4040d3

Please sign in to comment.