Add README, github workflow
All checks were successful
Publish / Build and publish (push) Successful in 4m45s

This commit is contained in:
Ben Kreeger 2025-09-11 22:21:15 -05:00
parent 073070029f
commit a26d6f5e09
Signed by: kreeger
GPG Key ID: D5CF8683D4BE4B50
2 changed files with 79 additions and 0 deletions

45
.github/workflows/publish.yaml vendored Normal file
View File

@ -0,0 +1,45 @@
---
name: Publish
on:
push: {branches: ["main"]}
workflow_dispatch:
workflow_run:
branches: ["main"]
types:
- completed
jobs:
publish:
name: Build and publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with: {fetch-depth: 0}
- name: Login to container registry
uses: docker/login-action@v3
with:
registry: https://git.kree.gr
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.IMAGE_NAME }}
flavor: |
latest=auto
prefix=
suffix=
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=sha,prefix=
- name: Build and publish
uses: devcontainers/ci@v0.3
with:
imageName: git.kree.gr/kreeger/devcontainer
cacheFrom: git.kree.gr/kreeger/devcontainer
push: always

34
README.md Normal file
View File

@ -0,0 +1,34 @@
# Kreeger's devcontainer
A devcontainer build that I use as the base for all my dev work.
## Building locally
Make sure you have the prerequisites installed. For me this meant BuildX and
BuildKit for Docker.
```bash
$ brew install docker-buildx
$ brew install buildkit
$ VERSION=$(curl https://api.github.com/repos/docker/buildx/releases/latest -s | jq .name -r)
$ ARCH=arm64
$ curl -LO https://github.com/docker/buildx/releases/download/${VERSION}/buildx-${VERSION}.darwin-${ARCH}
$ mkdir -p ~/.docker/cli-plugins
$ mv buildx-${VERSION}.darwin-${ARCH} ~/.docker/cli-plugins/docker-buildx
$ chmod +x ~/.docker/cli-plugins/docker-buildx
$ docker buildx version
```
Login to Gitea.
```bash
$ docker login git.kree.gr
```
And then build the thing.
```bash
$ DOCKER_BUILDKIT=1 devcontainer build --workspace-folder . \
--push true --image-name \
git.kree.gr/kreeger/devcontainer:${$(git rev-parse HEAD):-8}
```